summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2013-05-22 22:36:55 +0000
committerChad Rosier <mcrosier@apple.com>2013-05-22 22:36:55 +0000
commit682ae15bb92fb05a2fbb7b58a550adffb8538137 (patch)
tree3dccc0b2485e8e54231de9a18301a50d960c2066 /llvm/lib
parentc7505ef8ba9b50fa6afab71ba38204aeb8f23653 (diff)
downloadbcm5719-llvm-682ae15bb92fb05a2fbb7b58a550adffb8538137.tar.gz
bcm5719-llvm-682ae15bb92fb05a2fbb7b58a550adffb8538137.zip
Simplify logic now that r182490 is in place. No functional change intended.
llvm-svn: 182527
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index f1b83948113..1ca2d46cc29 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -229,10 +229,8 @@ void LiveIntervals::computeRegUnitInterval(LiveInterval *LI) {
// idempotent. It is very rare for a register unit to have multiple roots, so
// uniquing super-registers is probably not worthwhile.
for (MCRegUnitRootIterator Roots(Unit, TRI); Roots.isValid(); ++Roots) {
- unsigned Root = *Roots;
- if (!MRI->reg_empty(Root))
- LRCalc->createDeadDefs(LI, Root);
- for (MCSuperRegIterator Supers(Root, TRI); Supers.isValid(); ++Supers) {
+ for (MCSuperRegIterator Supers(*Roots, TRI, /*IncludeSelf=*/true);
+ Supers.isValid(); ++Supers) {
if (!MRI->reg_empty(*Supers))
LRCalc->createDeadDefs(LI, *Supers);
}
@@ -241,10 +239,8 @@ void LiveIntervals::computeRegUnitInterval(LiveInterval *LI) {
// Now extend LI to reach all uses.
// Ignore uses of reserved registers. We only track defs of those.
for (MCRegUnitRootIterator Roots(Unit, TRI); Roots.isValid(); ++Roots) {
- unsigned Root = *Roots;
- if (!MRI->isReserved(Root) && !MRI->reg_empty(Root))
- LRCalc->extendToUses(LI, Root);
- for (MCSuperRegIterator Supers(Root, TRI); Supers.isValid(); ++Supers) {
+ for (MCSuperRegIterator Supers(*Roots, TRI, /*IncludeSelf=*/true);
+ Supers.isValid(); ++Supers) {
unsigned Reg = *Supers;
if (!MRI->isReserved(Reg) && !MRI->reg_empty(Reg))
LRCalc->extendToUses(LI, Reg);
OpenPOWER on IntegriCloud