summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-08-19 00:17:30 +0000
committerOwen Anderson <resistor@mac.com>2008-08-19 00:17:30 +0000
commit442dc6fed07cb888fb28a11a42437d2f8ed24c78 (patch)
tree106f95dc1ea7960c01efeadf7d22b660a11982ce /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
parent4afb478d595b3fa9d254686a14dd2eed7d8175fc (diff)
downloadbcm5719-llvm-442dc6fed07cb888fb28a11a42437d2f8ed24c78.tar.gz
bcm5719-llvm-442dc6fed07cb888fb28a11a42437d2f8ed24c78.zip
Add a flag to enable the fast spilling path.
llvm-svn: 54958
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index 53d74fc2245..dae20caa41a 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -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!");
OpenPOWER on IntegriCloud