From df29b0d7b2d0305411d174a8113b799469fb2b8a Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Wed, 5 Nov 2008 00:32:13 +0000 Subject: [PATCH] Use the new predicate to control when we do prealloc splitting. Fix a small bug. llvm-svn: 58738 --- lib/CodeGen/PreAllocSplitting.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/PreAllocSplitting.cpp b/lib/CodeGen/PreAllocSplitting.cpp index f09ea23c108..09f002aa265 100644 --- a/lib/CodeGen/PreAllocSplitting.cpp +++ b/lib/CodeGen/PreAllocSplitting.cpp @@ -648,6 +648,10 @@ bool PreAllocSplitting::SplitRegLiveInterval(LiveInterval *LI) { if (DefMI && LIs->isReMaterializable(*LI, ValNo, DefMI)) 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. SmallPtrSet RefsInMBB; 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)); continue; } else - Stack.push_back(std::make_pair(PredMBB, ++S)); + Stack.push_back(std::make_pair(PredMBB, S+1)); MachineBasicBlock* MBB = *S; Visited.insert(MBB);