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
This commit is contained in:
Owen Anderson 2008-08-19 00:17:30 +00:00
parent 40610241d0
commit ae339babb2

View 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!");