diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-05-14 20:28:32 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-05-14 20:28:32 +0000 |
| commit | 670492c8ee01e8ed4ac03f418e982004873383eb (patch) | |
| tree | fc04e77aa5fe9864b772ec3b191f33b8ff2ffa2d /llvm/lib/CodeGen/RegAllocFast.cpp | |
| parent | 38d72d5a66eb5f405df8b0d9055863880c3a00f0 (diff) | |
| download | bcm5719-llvm-670492c8ee01e8ed4ac03f418e982004873383eb.tar.gz bcm5719-llvm-670492c8ee01e8ed4ac03f418e982004873383eb.zip | |
When verifying two-address instructions, check the following:
- Kill is implicit when use and def registers are identical.
- Only virtual registers can differ.
Add a -verify-fast-regalloc to run the verifier before the fast allocator.
llvm-svn: 103797
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocFast.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/RegAllocFast.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/RegAllocFast.cpp b/llvm/lib/CodeGen/RegAllocFast.cpp index fde71259960..db6c7096e32 100644 --- a/llvm/lib/CodeGen/RegAllocFast.cpp +++ b/llvm/lib/CodeGen/RegAllocFast.cpp @@ -35,6 +35,9 @@ #include <algorithm> using namespace llvm; +static cl::opt<bool> VerifyFastRegalloc("verify-fast-regalloc", cl::Hidden, + cl::desc("Verify machine code before fast regalloc")); + STATISTIC(NumStores, "Number of stores added"); STATISTIC(NumLoads , "Number of loads added"); @@ -778,6 +781,8 @@ bool RAFast::runOnMachineFunction(MachineFunction &Fn) { DEBUG(dbgs() << "********** FAST REGISTER ALLOCATION **********\n" << "********** Function: " << ((Value*)Fn.getFunction())->getName() << '\n'); + if (VerifyFastRegalloc) + Fn.verify(); MF = &Fn; MRI = &MF->getRegInfo(); TM = &Fn.getTarget(); |

