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

Jakob Stoklund Olesen stoklund at 2pi.dk
Mon Sep 12 09:54:42 PDT 2011


Author: stoklund
Date: Mon Sep 12 11:54:42 2011
New Revision: 139501

URL: http://llvm.org/viewvc/llvm-project?rev=139501&view=rev
Log:
Remove the -compact-regions flag.

It has been enabled by default for a while, it was only there to allow
performance comparisons.

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=139501&r1=139500&r2=139501&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Mon Sep 12 11:54:42 2011
@@ -51,8 +51,6 @@
 STATISTIC(NumLocalSplits,  "Number of split local live ranges");
 STATISTIC(NumEvicted,      "Number of interferences evicted");
 
-static cl::opt<bool> CompactRegions("compact-regions", cl::init(true));
-
 static cl::opt<SplitEditor::ComplementSpillMode>
 SplitSpillMode("split-spill-mode", cl::Hidden,
   cl::desc("Spill mode for splitting live ranges"),
@@ -410,15 +408,11 @@
 
   if (ExtraRegInfo[Reg].Stage == RS_Split) {
     // Unsplit ranges that couldn't be allocated immediately are deferred until
-    // everything else has been allocated. Long ranges are allocated last so
-    // they are split against realistic interference.
-    if (CompactRegions)
-      Prio = Size;
-    else
-      Prio = (1u << 31) - Size;
+    // everything else has been allocated.
+    Prio = Size;
   } else {
-    // Everything else is allocated in long->short order. Long ranges that don't
-    // fit should be spilled ASAP so they don't create interference.
+    // Everything is allocated in long->short order. Long ranges that don't fit
+    // should be spilled (or split) ASAP so they don't create interference.
     Prio = (1u << 31) + Size;
 
     // Boost ranges that have a physical register hint.
@@ -1092,7 +1086,7 @@
   SmallVector<unsigned, 8> UsedCands;
 
   // Check if we can split this live range around a compact region.
-  bool HasCompact = CompactRegions && calcCompactRegion(GlobalCand.front());
+  bool HasCompact = calcCompactRegion(GlobalCand.front());
   if (HasCompact) {
     // Yes, keep GlobalCand[0] as the compact region candidate.
     NumCands = 1;





More information about the llvm-commits mailing list