diff options
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(); |