mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Fix up kill/dead marking in the new live interval reconstruction code.
llvm-svn: 61460
This commit is contained in:
parent
4acaef9e5f
commit
e5b1fb3c25
@ -722,10 +722,9 @@ VNInfo* PreAllocSplitting::PerformPHIConstruction(
|
||||
NewVNs, Visited, false);
|
||||
|
||||
// FIXME: Need to set kills properly for inter-block stuff.
|
||||
if (toplevel) {
|
||||
if (LI->isKill(ret, UseIndex)) LI->removeKill(ret, UseIndex);
|
||||
if (LI->isKill(ret, UseIndex)) LI->removeKill(ret, UseIndex);
|
||||
if (toplevel)
|
||||
LI->addKill(ret, EndIndex);
|
||||
}
|
||||
|
||||
LI->addRange(LiveRange(UseIndex, EndIndex, ret));
|
||||
} else if (ContainsDefs && ContainsUses){
|
||||
@ -778,10 +777,9 @@ VNInfo* PreAllocSplitting::PerformPHIConstruction(
|
||||
ret = PerformPHIConstruction(walker, LI, Defs, Uses,
|
||||
NewVNs, Visited, false);
|
||||
|
||||
// FIXME: Need to set kills properly for inter-block stuff.
|
||||
if (foundUse && LI->isKill(ret, StartIndex))
|
||||
LI->removeKill(ret, StartIndex);
|
||||
if (toplevel) {
|
||||
if (foundUse && LI->isKill(ret, StartIndex))
|
||||
LI->removeKill(ret, StartIndex);
|
||||
LI->addKill(ret, EndIndex);
|
||||
}
|
||||
|
||||
@ -834,6 +832,20 @@ void PreAllocSplitting::ReconstructLiveInterval(LiveInterval* LI) {
|
||||
DenseMap<MachineBasicBlock*, VNInfo*> Visited;
|
||||
PerformPHIConstruction(&*UI, LI, Defs, Uses, NewVNs, Visited, true);
|
||||
}
|
||||
|
||||
// Add ranges for dead defs
|
||||
for (MachineRegisterInfo::def_iterator DI = MRI->def_begin(LI->reg),
|
||||
DE = MRI->def_end(); DI != DE; ++DI) {
|
||||
unsigned DefIdx = LIs->getInstructionIndex(&*DI);
|
||||
DefIdx = LiveIntervals::getDefIndex(DefIdx);
|
||||
unsigned UseIdx = LiveIntervals::getUseIndex(DefIdx);
|
||||
|
||||
if (LI->liveAt(DefIdx)) continue;
|
||||
|
||||
VNInfo* DeadVN = NewVNs[&*DI];
|
||||
LI->addRange(LiveRange(DefIdx, UseIdx, DeadVN));
|
||||
LI->addKill(DeadVN, DefIdx);
|
||||
}
|
||||
}
|
||||
|
||||
/// ShrinkWrapLiveInterval - Recursively traverse the predecessor
|
||||
|
Loading…
Reference in New Issue
Block a user