Dead code elimination may separate the live interval into multiple connected components.

I have convinced myself that it can only happen when a phi value dies. When it
happens, allocate new virtual registers for the components.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127827 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen
2011-03-17 20:37:07 +00:00
parent c74513d1b6
commit 6a3dbd3b25
6 changed files with 47 additions and 23 deletions

View File

@ -538,11 +538,11 @@ void SplitEditor::openIntv() {
// Create the complement as index 0.
if (Edit->empty())
Edit->create(MRI, LIS, VRM);
Edit->create(LIS, VRM);
// Create the open interval.
OpenIdx = Edit->size();
Edit->create(MRI, LIS, VRM);
Edit->create(LIS, VRM);
}
SlotIndex SplitEditor::enterIntvBefore(SlotIndex Idx) {
@ -802,7 +802,7 @@ void SplitEditor::deleteRematVictims() {
if (Dead.empty())
return;
Edit->eliminateDeadDefs(Dead, LIS, TII);
Edit->eliminateDeadDefs(Dead, LIS, VRM, TII);
}
void SplitEditor::finish() {
@ -866,7 +866,7 @@ void SplitEditor::finish() {
SmallVector<LiveInterval*, 8> dups;
dups.push_back(li);
for (unsigned i = 1; i != NumComp; ++i)
dups.push_back(&Edit->create(MRI, LIS, VRM));
dups.push_back(&Edit->create(LIS, VRM));
ConEQ.Distribute(&dups[0], MRI);
}