diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-01-20 06:20:00 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-01-20 06:20:00 +0000 |
| commit | 145755f1d60909407ea4382c0b120871541002c5 (patch) | |
| tree | 7924e8b943df07f3ce5d81df1ed96319c9956690 /llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp | |
| parent | 16b2d2bf197223901bf66a8ccc05486259fdb89f (diff) | |
| download | bcm5719-llvm-145755f1d60909407ea4382c0b120871541002c5.tar.gz bcm5719-llvm-145755f1d60909407ea4382c0b120871541002c5.zip | |
Add hidden -verify-coalescing to run the machine code verifier before and after
register coalescing.
llvm-svn: 123890
Diffstat (limited to 'llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp index ac11dfd2bb0..e616d3536fe 100644 --- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp @@ -65,6 +65,11 @@ DisablePhysicalJoin("disable-physical-join", cl::desc("Avoid coalescing physical register copies"), cl::init(false), cl::Hidden); +static cl::opt<bool> +VerifyCoalescing("verify-coalescing", + cl::desc("Verify machine instrs before and after register coalescing"), + cl::Hidden); + INITIALIZE_AG_PASS_BEGIN(SimpleRegisterCoalescing, RegisterCoalescer, "simple-register-coalescing", "Simple Register Coalescing", false, false, true) @@ -1635,6 +1640,9 @@ bool SimpleRegisterCoalescing::runOnMachineFunction(MachineFunction &fn) { << "********** Function: " << ((Value*)mf_->getFunction())->getName() << '\n'); + if (VerifyCoalescing) + mf_->verify(this, "Before register coalescing"); + for (TargetRegisterInfo::regclass_iterator I = tri_->regclass_begin(), E = tri_->regclass_end(); I != E; ++I) allocatableRCRegs_.insert(std::make_pair(*I, @@ -1777,6 +1785,8 @@ bool SimpleRegisterCoalescing::runOnMachineFunction(MachineFunction &fn) { DEBUG(dump()); DEBUG(ldv_->dump()); + if (VerifyCoalescing) + mf_->verify(this, "After register coalescing"); return true; } |

