diff options
| author | Matthias Braun <matze@braunis.de> | 2014-12-15 21:36:35 +0000 |
|---|---|---|
| committer | Matthias Braun <matze@braunis.de> | 2014-12-15 21:36:35 +0000 |
| commit | c3a72c2e5f59a52d05d32e5c9d600ecb3c8721d2 (patch) | |
| tree | 0e3ad1d87e49f190b134a1cac2538f8929f131d3 /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | |
| parent | 1c38396db7dd59340fbbeb59925b3448489c3f8d (diff) | |
| download | bcm5719-llvm-c3a72c2e5f59a52d05d32e5c9d600ecb3c8721d2.tar.gz bcm5719-llvm-c3a72c2e5f59a52d05d32e5c9d600ecb3c8721d2.zip | |
Revert "LiveRangeCalc: Rewrite subrange calculation"
Revert until I find out why non-subreg enabled targets break.
This reverts commit 6097277eefb9c5fb35a7f493c783ee1fd1b9d6a7.
llvm-svn: 224278
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index b71e819f0d3..f48be4d5eb0 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -192,7 +192,8 @@ void LiveIntervals::computeVirtRegInterval(LiveInterval &LI) { assert(LRCalc && "LRCalc not initialized."); assert(LI.empty() && "Should only compute empty intervals."); LRCalc->reset(MF, getSlotIndexes(), DomTree, &getVNInfoAllocator()); - LRCalc->calculate(LI); + LRCalc->createDeadDefs(LI); + LRCalc->extendToUses(LI); computeDeadValues(LI, LI); } @@ -253,12 +254,19 @@ void LiveIntervals::computeRegUnitRange(LiveRange &LR, unsigned Unit) { for (MCRegUnitRootIterator Roots(Unit, TRI); Roots.isValid(); ++Roots) { for (MCSuperRegIterator Supers(*Roots, TRI, /*IncludeSelf=*/true); Supers.isValid(); ++Supers) { + if (!MRI->reg_empty(*Supers)) + LRCalc->createDeadDefs(LR, *Supers); + } + } + + // Now extend LR to reach all uses. + // Ignore uses of reserved registers. We only track defs of those. + for (MCRegUnitRootIterator Roots(Unit, TRI); Roots.isValid(); ++Roots) { + for (MCSuperRegIterator Supers(*Roots, TRI, /*IncludeSelf=*/true); + Supers.isValid(); ++Supers) { unsigned Reg = *Supers; - if (MRI->reg_empty(Reg)) - continue; - // Ignore uses of reserved registers. We only track defs of those. - bool IgnoreUses = MRI->isReserved(Reg); - LRCalc->calculate(LR, *Supers, IgnoreUses); + if (!MRI->isReserved(Reg) && !MRI->reg_empty(Reg)) + LRCalc->extendToUses(LR, Reg); } } } |

