summaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-11-07 18:04:58 +0000
committerChris Lattner <sabre@nondot.org>2006-11-07 18:04:58 +0000
commit393ebae0ef7fa72d133bf901a02fcce3b5554ab7 (patch)
tree6543ee812ef6163fe797b1e47a0a0eb5fa33e057 /lib/CodeGen/LiveIntervalAnalysis.cpp
parentb9cac27f7dcce31dd69864c423f22a2e1f1cce23 (diff)
downloadllvm-393ebae0ef7fa72d133bf901a02fcce3b5554ab7.tar.gz
llvm-393ebae0ef7fa72d133bf901a02fcce3b5554ab7.tar.bz2
llvm-393ebae0ef7fa72d133bf901a02fcce3b5554ab7.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31504 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index 8b534af74b..e1cd741d7a 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/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;
}
}