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
This commit is contained in:
Jakob Stoklund Olesen 2010-08-31 01:27:49 +00:00
parent 5a5f2c76b6
commit 9c39690edf
1 changed files with 10 additions and 0 deletions

View File

@ -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.