[llvm-commits] [llvm] r58738 - /llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp

Owen Anderson resistor at mac.com
Tue Nov 4 16:32:13 PST 2008


Author: resistor
Date: Tue Nov  4 18:32:13 2008
New Revision: 58738

URL: http://llvm.org/viewvc/llvm-project?rev=58738&view=rev
Log:
Use the new predicate to control when we do prealloc splitting.  Fix a small bug.

Modified:
    llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp

Modified: llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp?rev=58738&r1=58737&r2=58738&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp (original)
+++ llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp Tue Nov  4 18:32:13 2008
@@ -648,6 +648,10 @@
   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<MachineInstr*, 4> RefsInMBB;
   for (MachineRegisterInfo::reg_iterator I = MRI->reg_begin(CurrLI->reg),
@@ -862,7 +866,7 @@
       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);





More information about the llvm-commits mailing list