Use the new predicate to control when we do prealloc splitting. Fix a small bug.

llvm-svn: 58738
This commit is contained in:
Owen Anderson 2008-11-05 00:32:13 +00:00
parent 33ba5e78d2
commit 26c10f1b4a
1 changed files with 5 additions and 1 deletions

View File

@ -648,6 +648,10 @@ bool PreAllocSplitting::SplitRegLiveInterval(LiveInterval *LI) {
if (DefMI && LIs->isReMaterializable(*LI, ValNo, DefMI)) if (DefMI && LIs->isReMaterializable(*LI, ValNo, DefMI))
return false; return false;
// If this would create a new join point, do not split.
if (DefMI && createsNewJoin(LR, DefMI->getParent(), Barrier->getParent()))
return false;
// Find all references in the barrier mbb. // Find all references in the barrier mbb.
SmallPtrSet<MachineInstr*, 4> RefsInMBB; SmallPtrSet<MachineInstr*, 4> RefsInMBB;
for (MachineRegisterInfo::reg_iterator I = MRI->reg_begin(CurrLI->reg), for (MachineRegisterInfo::reg_iterator I = MRI->reg_begin(CurrLI->reg),
@ -862,7 +866,7 @@ bool PreAllocSplitting::createsNewJoin(LiveRange* LR,
Stack.push_back(std::make_pair(PredMBB, ++S)); Stack.push_back(std::make_pair(PredMBB, ++S));
continue; continue;
} else } else
Stack.push_back(std::make_pair(PredMBB, ++S)); Stack.push_back(std::make_pair(PredMBB, S+1));
MachineBasicBlock* MBB = *S; MachineBasicBlock* MBB = *S;
Visited.insert(MBB); Visited.insert(MBB);