mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Revert "LiveRangeCalc: Rewrite subrange calculation"
Revert until I find out why non-subreg enabled targets break.
This reverts commit 6097277eef
.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224278 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
@ -250,15 +251,22 @@ void LiveIntervals::computeRegUnitRange(LiveRange &LR, unsigned Unit) {
|
||||
// may share super-registers. That's OK because createDeadDefs() is
|
||||
// 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) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user