diff options
author | Chris Lattner <sabre@nondot.org> | 2006-11-07 18:04:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-11-07 18:04:58 +0000 |
commit | b18177bfab952d6d90d932294982b58c96a852ec (patch) | |
tree | 56c34d4b6b7023f7f80c7d883b71ba1c7c18b0bc /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | |
parent | 0e9c437f0bdfaa020ced4bba77475410f5917b65 (diff) | |
download | bcm5719-llvm-b18177bfab952d6d90d932294982b58c96a852ec.tar.gz bcm5719-llvm-b18177bfab952d6d90d932294982b58c96a852ec.zip |
Enable improved spilling costs by default. This speeds up viterbi on x86
by 40%, FreeBench/fourinarow by 20%, and many other programs 10-25%.
On PPC, this speeds up fourinarow by 18%, and probably other things as well.
llvm-svn: 31504
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index 8b534af74b3..e1cd741d7a8 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -59,9 +59,6 @@ namespace { EnableJoining("join-liveintervals", cl::desc("Coallesce copies (default=true)"), cl::init(true)); - static cl::opt<bool> - EnableReweight("enable-majik-f00"); - } void LiveIntervals::getAnalysisUsage(AnalysisUsage &AU) const { @@ -221,16 +218,14 @@ bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) { if (isZeroLengthInterval(&LI)) LI.weight = HUGE_VALF; - if (EnableReweight) { - // Divide the weight of the interval by its size. This encourages - // spilling of intervals that are large and have few uses, and - // discourages spilling of small intervals with many uses. - unsigned Size = 0; - for (LiveInterval::iterator II = LI.begin(), E = LI.end(); II != E;++II) - Size += II->end - II->start; + // Divide the weight of the interval by its size. This encourages + // spilling of intervals that are large and have few uses, and + // discourages spilling of small intervals with many uses. + unsigned Size = 0; + for (LiveInterval::iterator II = LI.begin(), E = LI.end(); II != E;++II) + Size += II->end - II->start; - LI.weight /= Size; - } + LI.weight /= Size; } } |