diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-12-07 00:28:32 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-12-07 00:28:32 +0000 |
commit | 36f323cbb6d99c7e28a64926432b0e7a5612a1ba (patch) | |
tree | 3475a4862f068710b91b0373ced6d5e0b2f8cfda /lib/CodeGen/SimpleRegisterCoalescing.cpp | |
parent | 62cdc64d583e1732b14d2e61a8c5b7e62239879e (diff) | |
download | external_llvm-36f323cbb6d99c7e28a64926432b0e7a5612a1ba.zip external_llvm-36f323cbb6d99c7e28a64926432b0e7a5612a1ba.tar.gz external_llvm-36f323cbb6d99c7e28a64926432b0e7a5612a1ba.tar.bz2 |
Add an option to control this heuristic tweak so I can test it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44671 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SimpleRegisterCoalescing.cpp')
-rw-r--r-- | lib/CodeGen/SimpleRegisterCoalescing.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp index 6eec5ab..7252f66 100644 --- a/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/lib/CodeGen/SimpleRegisterCoalescing.cpp @@ -52,6 +52,11 @@ namespace { cl::desc("Use new coalescer heuristic"), cl::init(false)); + static cl::opt<bool> + ReMatSpillWeight("tweak-remat-spill-weight", + cl::desc("Tweak spill weight of re-materializable intervals"), + cl::init(true)); + RegisterPass<SimpleRegisterCoalescing> X("simple-register-coalescing", "Simple Register Coalescing"); @@ -1487,7 +1492,7 @@ bool SimpleRegisterCoalescing::runOnMachineFunction(MachineFunction &fn) { LI.weight = HUGE_VALF; else { bool isLoad = false; - if (li_->isReMaterializable(LI, isLoad)) { + if (ReMatSpillWeight && li_->isReMaterializable(LI, isLoad)) { // If all of the definitions of the interval are re-materializable, // it is a preferred candidate for spilling. If non of the defs are // loads, then it's potentially very cheap to re-materialize. |