aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SimpleRegisterCoalescing.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-11-12 06:35:08 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-11-12 06:35:08 +0000
commitf2fbca68f868122d6df0bfc9952b4e4c3dfb60b7 (patch)
tree197e4d100a9d1fe7658b502eb4e24c0d987877b3 /lib/CodeGen/SimpleRegisterCoalescing.cpp
parente6e1384c57e8c4ca99d881c35ebe6af01c177bcb (diff)
downloadexternal_llvm-f2fbca68f868122d6df0bfc9952b4e4c3dfb60b7.zip
external_llvm-f2fbca68f868122d6df0bfc9952b4e4c3dfb60b7.tar.gz
external_llvm-f2fbca68f868122d6df0bfc9952b4e4c3dfb60b7.tar.bz2
Refactor some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44010 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SimpleRegisterCoalescing.cpp')
-rw-r--r--lib/CodeGen/SimpleRegisterCoalescing.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp
index 00c820e..623d295 100644
--- a/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/lib/CodeGen/SimpleRegisterCoalescing.cpp
@@ -1460,8 +1460,7 @@ bool SimpleRegisterCoalescing::runOnMachineFunction(MachineFunction &fn) {
if (UniqueUses.count(reg) != 0)
continue;
LiveInterval &RegInt = li_->getInterval(reg);
- float w = (mop.isUse()+mop.isDef()) * powf(10.0F, (float)loopDepth);
- RegInt.weight += w;
+ RegInt.weight += li_->getSpillWeight(mop, loopDepth);
UniqueUses.insert(reg);
}
}