summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-12-07 00:28:32 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-12-07 00:28:32 +0000
commit85cdba29b01b871055e45406de6a00cca83ad479 (patch)
tree88aedca5df3159e4db5f1c6212a663fb08027ba7 /llvm/lib/CodeGen
parent2bbd03a7551146404d0db339882db113b6718721 (diff)
downloadbcm5719-llvm-85cdba29b01b871055e45406de6a00cca83ad479.tar.gz
bcm5719-llvm-85cdba29b01b871055e45406de6a00cca83ad479.zip
Add an option to control this heuristic tweak so I can test it.
llvm-svn: 44671
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
index 6eec5ab885c..7252f66ba04 100644
--- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud