[llvm-commits] [llvm] r137002 - /llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Fri Aug 5 16:50:33 PDT 2011


Author: stoklund
Date: Fri Aug  5 18:50:33 2011
New Revision: 137002

URL: http://llvm.org/viewvc/llvm-project?rev=137002&view=rev
Log:
Reject RS_Spill ranges from local splitting as well.

All new local ranges are marked as RS_New now, so there is no need to
attempt splitting of RS_Spill ranges any more.

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

Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp?rev=137002&r1=137001&r2=137002&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Fri Aug  5 18:50:33 2011
@@ -1501,6 +1501,10 @@
 /// @return Physreg when VirtReg may be assigned and/or new NewVRegs.
 unsigned RAGreedy::trySplit(LiveInterval &VirtReg, AllocationOrder &Order,
                             SmallVectorImpl<LiveInterval*>&NewVRegs) {
+  // Ranges must be Split2 or less.
+  if (getStage(VirtReg) >= RS_Spill)
+    return 0;
+
   // Local intervals are handled separately.
   if (LIS->intervalIsInOneMBB(VirtReg)) {
     NamedRegionTimer T("Local Splitting", TimerGroupName, TimePassesIsEnabled);
@@ -1510,10 +1514,6 @@
 
   NamedRegionTimer T("Global Splitting", TimerGroupName, TimePassesIsEnabled);
 
-  // Ranges must be Split2 or less.
-  if (getStage(VirtReg) >= RS_Spill)
-    return 0;
-
   SA->analyze(&VirtReg);
 
   // FIXME: SplitAnalysis may repair broken live ranges coming from the





More information about the llvm-commits mailing list