mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 02:29:18 +00:00
Recompute hasPHIKill flags when shrinking live intervals.
PHI values may be deleted, causing the flags to be wrong. This fixes PR9616. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129092 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4d4e25740b
commit
e815dab69f
@ -787,6 +787,8 @@ bool LiveIntervals::shrinkToUses(LiveInterval *li,
|
||||
VNInfo *VNI = *I;
|
||||
if (VNI->isUnused())
|
||||
continue;
|
||||
// We may eliminate PHI values, so recompute PHIKill flags.
|
||||
VNI->setHasPHIKill(false);
|
||||
NewLI.addRange(LiveRange(VNI->def, VNI->def.getNextSlot(), VNI));
|
||||
|
||||
// A use tied to an early-clobber def ends at the load slot and isn't caught
|
||||
@ -822,7 +824,7 @@ bool LiveIntervals::shrinkToUses(LiveInterval *li,
|
||||
VNInfo *PVNI = li->getVNInfoAt(Stop);
|
||||
// A predecessor is not required to have a live-out value for a PHI.
|
||||
if (PVNI) {
|
||||
assert(PVNI->hasPHIKill() && "Missing hasPHIKill flag");
|
||||
PVNI->setHasPHIKill(true);
|
||||
WorkList.push_back(std::make_pair(Stop, PVNI));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user