From ae339babb2a2445e7bb009912a39994718f10d54 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Tue, 19 Aug 2008 00:17:30 +0000 Subject: [PATCH] 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 --- lib/CodeGen/LiveIntervalAnalysis.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 53d74fc2245..dae20caa41a 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -49,6 +49,9 @@ static cl::opt SplitLimit("split-limit", static cl::opt EnableAggressiveRemat("aggressive-remat", cl::Hidden); +static cl::opt 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 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!");