aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAllocFast.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/RegAllocFast.cpp')
-rw-r--r--lib/CodeGen/RegAllocFast.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/RegAllocFast.cpp b/lib/CodeGen/RegAllocFast.cpp
index fde7125996..db6c7096e3 100644
--- a/lib/CodeGen/RegAllocFast.cpp
+++ b/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();