Help testing.

llvm-svn: 47448
This commit is contained in:
Evan Cheng 2008-02-21 19:20:21 +00:00
parent 7f8ebb73af
commit 31160f5b98
1 changed files with 7 additions and 0 deletions

View File

@ -57,6 +57,10 @@ namespace {
CommuteDef("coalescer-commute-instrs",
cl::init(false), cl::Hidden);
static cl::opt<int>
CommuteLimit("commute-limit",
cl::init(-1), cl::Hidden);
RegisterPass<SimpleRegisterCoalescing>
X("simple-register-coalescing", "Simple Register Coalescing");
@ -289,6 +293,9 @@ bool SimpleRegisterCoalescing::RemoveCopyByCommutingDef(LiveInterval &IntA,
if (HasOtherReachingDefs(IntA, IntB, AValNo, BValNo))
return false;
if (CommuteLimit >= 0 && numCommutes >= CommuteLimit)
return false;
// At this point we have decided that it is legal to do this
// transformation. Start by commuting the instruction.
MachineBasicBlock *MBB = DefMI->getParent();