aboutsummaryrefslogtreecommitdiffstats
path: root/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
commitae339babb2a2445e7bb009912a39994718f10d54 (patch)
treead8d31a34fa3a1042666f86de59d18fd43437cf8 /lib/CodeGen/LiveIntervalAnalysis.cpp
parent40610241d00e219341ff4b7106c5baff08ad407b (diff)
downloadexternal_llvm-ae339babb2a2445e7bb009912a39994718f10d54.zip
external_llvm-ae339babb2a2445e7bb009912a39994718f10d54.tar.gz
external_llvm-ae339babb2a2445e7bb009912a39994718f10d54.tar.bz2
Add a flag to enable the fast spilling path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54958 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index 53d74fc..dae20ca 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/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!");