diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-08-31 01:27:49 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-08-31 01:27:49 +0000 |
commit | e49e6a852b29b4f5fb13160ca3d2cc316f43030b (patch) | |
tree | 940b83a9b3d67e0a66ae5185d0117a2dc2ab6d00 /lib/CodeGen/SimpleRegisterCoalescing.cpp | |
parent | 49998ce46a04e578d2de51bc257f061d56eab785 (diff) | |
download | external_llvm-e49e6a852b29b4f5fb13160ca3d2cc316f43030b.zip external_llvm-e49e6a852b29b4f5fb13160ca3d2cc316f43030b.tar.gz external_llvm-e49e6a852b29b4f5fb13160ca3d2cc316f43030b.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112567 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SimpleRegisterCoalescing.cpp')
-rw-r--r-- | lib/CodeGen/SimpleRegisterCoalescing.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp index 34c4841..5dd5fdb 100644 --- a/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/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. |