Add a flag to enable the fast spilling path.
authorOwen Anderson <resistor@mac.com>
Tue, 19 Aug 2008 00:17:30 +0000 (00:17 +0000)
committerOwen Anderson <resistor@mac.com>
Tue, 19 Aug 2008 00:17:30 +0000 (00:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54958 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/LiveIntervalAnalysis.cpp

index 53d74fc22458fe3f63c2d06df432faadda47032a..dae20caa41aa9547af635c1dc7149b0a6e6f5ff4 100644 (file)
@@ -49,6 +49,9 @@ static cl::opt<int> SplitLimit("split-limit",
 
 static cl::opt<bool> EnableAggressiveRemat("aggressive-remat", cl::Hidden);
 
+static cl::opt<bool> EnableFastSpilling("fast-spill",
+                                        cl::init(false), cl::Hidden);
+
 STATISTIC(numIntervals, "Number of original intervals");
 STATISTIC(numIntervalsAfter, "Number of intervals after coalescing");
 STATISTIC(numFolds    , "Number of loads/stores folded into instructions");
@@ -1698,6 +1701,10 @@ std::vector<LiveInterval*> LiveIntervals::
 addIntervalsForSpills(const LiveInterval &li,
                       const MachineLoopInfo *loopInfo, VirtRegMap &vrm,
                       float &SSWeight) {
+  
+  if (EnableFastSpilling)
+    return addIntervalsForSpillsFast(li, loopInfo, vrm, SSWeight);
+  
   assert(li.weight != HUGE_VALF &&
          "attempt to spill already spilled interval!");