diff options
author | Chad Rosier <mcrosier@apple.com> | 2013-05-22 22:36:55 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2013-05-22 22:36:55 +0000 |
commit | b018bab0b85c7b77ab7111946ea4b82bb6153a5c (patch) | |
tree | e649816b222fe9dc996d928b7a608ea58a7408ba | |
parent | 5cc3c989fc4295103ee46a2697e82dc1c4453545 (diff) | |
download | external_llvm-b018bab0b85c7b77ab7111946ea4b82bb6153a5c.zip external_llvm-b018bab0b85c7b77ab7111946ea4b82bb6153a5c.tar.gz external_llvm-b018bab0b85c7b77ab7111946ea4b82bb6153a5c.tar.bz2 |
Simplify logic now that r182490 is in place. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182527 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/LiveIntervalAnalysis.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index f1b8394..1ca2d46 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/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); |