[llvm-commits] [llvm] r44671 - /llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
Evan Cheng
evan.cheng at apple.com
Thu Dec 6 16:28:33 PST 2007
Author: evancheng
Date: Thu Dec 6 18:28:32 2007
New Revision: 44671
URL: http://llvm.org/viewvc/llvm-project?rev=44671&view=rev
Log:
Add an option to control this heuristic tweak so I can test it.
Modified:
llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=44671&r1=44670&r2=44671&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original)
+++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Thu Dec 6 18:28:32 2007
@@ -52,6 +52,11 @@
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 @@
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.
More information about the llvm-commits
mailing list