mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-02 07:32:52 +00:00
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
This commit is contained in:
parent
5cc3c989fc
commit
b018bab0b8
@ -229,10 +229,8 @@ void LiveIntervals::computeRegUnitInterval(LiveInterval *LI) {
|
|||||||
// idempotent. It is very rare for a register unit to have multiple roots, so
|
// idempotent. It is very rare for a register unit to have multiple roots, so
|
||||||
// uniquing super-registers is probably not worthwhile.
|
// uniquing super-registers is probably not worthwhile.
|
||||||
for (MCRegUnitRootIterator Roots(Unit, TRI); Roots.isValid(); ++Roots) {
|
for (MCRegUnitRootIterator Roots(Unit, TRI); Roots.isValid(); ++Roots) {
|
||||||
unsigned Root = *Roots;
|
for (MCSuperRegIterator Supers(*Roots, TRI, /*IncludeSelf=*/true);
|
||||||
if (!MRI->reg_empty(Root))
|
Supers.isValid(); ++Supers) {
|
||||||
LRCalc->createDeadDefs(LI, Root);
|
|
||||||
for (MCSuperRegIterator Supers(Root, TRI); Supers.isValid(); ++Supers) {
|
|
||||||
if (!MRI->reg_empty(*Supers))
|
if (!MRI->reg_empty(*Supers))
|
||||||
LRCalc->createDeadDefs(LI, *Supers);
|
LRCalc->createDeadDefs(LI, *Supers);
|
||||||
}
|
}
|
||||||
@ -241,10 +239,8 @@ void LiveIntervals::computeRegUnitInterval(LiveInterval *LI) {
|
|||||||
// Now extend LI to reach all uses.
|
// Now extend LI to reach all uses.
|
||||||
// Ignore uses of reserved registers. We only track defs of those.
|
// Ignore uses of reserved registers. We only track defs of those.
|
||||||
for (MCRegUnitRootIterator Roots(Unit, TRI); Roots.isValid(); ++Roots) {
|
for (MCRegUnitRootIterator Roots(Unit, TRI); Roots.isValid(); ++Roots) {
|
||||||
unsigned Root = *Roots;
|
for (MCSuperRegIterator Supers(*Roots, TRI, /*IncludeSelf=*/true);
|
||||||
if (!MRI->isReserved(Root) && !MRI->reg_empty(Root))
|
Supers.isValid(); ++Supers) {
|
||||||
LRCalc->extendToUses(LI, Root);
|
|
||||||
for (MCSuperRegIterator Supers(Root, TRI); Supers.isValid(); ++Supers) {
|
|
||||||
unsigned Reg = *Supers;
|
unsigned Reg = *Supers;
|
||||||
if (!MRI->isReserved(Reg) && !MRI->reg_empty(Reg))
|
if (!MRI->isReserved(Reg) && !MRI->reg_empty(Reg))
|
||||||
LRCalc->extendToUses(LI, Reg);
|
LRCalc->extendToUses(LI, Reg);
|
||||||
|
Loading…
Reference in New Issue
Block a user