summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-08-31 01:27:49 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-08-31 01:27:49 +0000
commit9c39690edfc901d1ab7cc5726088879d0113684a (patch)
tree1cab8f9b5597b9563e326a1448588b5109602c5e /llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
parent5a5f2c76b6f70c207df50ebb6c7c467cc9e64407 (diff)
downloadbcm5719-llvm-9c39690edfc901d1ab7cc5726088879d0113684a.tar.gz
bcm5719-llvm-9c39690edfc901d1ab7cc5726088879d0113684a.zip
Add experimental -disable-physical-join command line option.
Eventually, we want to disable physreg coalescing completely, and let the register allocator do its job using hints. This option makes it possible to measure the impact of disabling physreg coalescing. llvm-svn: 112567
Diffstat (limited to 'llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp')
-rw-r--r--llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
index 34c484103cf..5dd5fdb7b15 100644
--- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
@@ -59,6 +59,11 @@ DisableCrossClassJoin("disable-cross-class-join",
cl::desc("Avoid coalescing cross register class copies"),
cl::init(false), cl::Hidden);
+static cl::opt<bool>
+DisablePhysicalJoin("disable-physical-join",
+ cl::desc("Avoid coalescing physical register copies"),
+ cl::init(false), cl::Hidden);
+
INITIALIZE_AG_PASS(SimpleRegisterCoalescing, RegisterCoalescer,
"simple-register-coalescing", "Simple Register Coalescing",
false, false, true);
@@ -1036,6 +1041,11 @@ bool SimpleRegisterCoalescing::JoinCopy(CopyRec &TheCopy, bool &Again) {
return false; // Not coalescable.
}
+ if (DisablePhysicalJoin && CP.isPhys()) {
+ DEBUG(dbgs() << "\tPhysical joins disabled.\n");
+ return false;
+ }
+
DEBUG(dbgs() << "\tConsidering merging %reg" << CP.getSrcReg());
// Enforce policies.
OpenPOWER on IntegriCloud