summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-07-23 19:47:27 +0000
committerOwen Anderson <resistor@mac.com>2008-07-23 19:47:27 +0000
commit7c800ad977248601263bec5ac46969ddabf1535f (patch)
treef895db3916a2fc836c6fcf7c6328c0dbd0d6c845 /llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
parentae187c6ebadd1146a4bdf4a12217e80d45073a23 (diff)
Fix a compile-time regression introduced by my heuristic-changing patch. I forgot
to multiply the instruction count by a constant factor in a few places, which caused the register allocator to require many more iterations. llvm-svn: 53959
Diffstat (limited to 'llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp')
-rw-r--r--llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
index 29e634b477d1..68be3e111fb2 100644
--- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
@@ -2196,7 +2196,7 @@ bool SimpleRegisterCoalescing::runOnMachineFunction(MachineFunction &fn) {
// 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.
- LI.weight /= li_->getApproximateInstructionCount(LI);
+ LI.weight /= li_->getApproximateInstructionCount(LI) * InstrSlots::NUM;
}
}