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 | b908a009cf3d85586c6ca25d1de035b7d2b030b5 (patch) | |
tree | a1497be38b41fbabd71d433f79bb7163e82ce06c /lib | |
parent | 8b1659e8bf957f09da5cf912ad2702b3366e4c08 (diff) | |
download | external_llvm-b908a009cf3d85586c6ca25d1de035b7d2b030b5.zip external_llvm-b908a009cf3d85586c6ca25d1de035b7d2b030b5.tar.gz external_llvm-b908a009cf3d85586c6ca25d1de035b7d2b030b5.tar.bz2 |
Add hidden -verify-coalescing to run the machine code verifier before and after
register coalescing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123890 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-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 ac11dfd..e616d35 100644 --- a/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/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; } |