summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-01-21 03:51:36 +0000
committerDan Gohman <gohman@apple.com>2010-01-21 03:51:36 +0000
commit55a365e7970027629bcfd1326be6eae12f216c3e (patch)
treedc11b3880080b3155b9fb0e221516eba5316d64f
parent87f2f9b4656fb11104bbb2d80fcfaac998865f50 (diff)
downloadbcm5719-llvm-55a365e7970027629bcfd1326be6eae12f216c3e.tar.gz
bcm5719-llvm-55a365e7970027629bcfd1326be6eae12f216c3e.zip
Run the verifier after LSR, to help catch use-before-def errors before
they reach codegen. llvm-svn: 94066
-rw-r--r--llvm/lib/CodeGen/LLVMTargetMachine.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
index 837e1848aa5..c761f8dd927 100644
--- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
@@ -14,6 +14,7 @@
#include "llvm/Target/TargetMachine.h"
#include "llvm/PassManager.h"
#include "llvm/Pass.h"
+#include "llvm/Analysis/Verifier.h"
#include "llvm/Assembly/PrintModulePass.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/CodeGen/Passes.h"
@@ -282,6 +283,9 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM,
PM.add(createLoopStrengthReducePass(getTargetLowering()));
if (PrintLSR)
PM.add(createPrintFunctionPass("\n\n*** Code after LSR ***\n", &dbgs()));
+#ifndef NDEBUG
+ PM.add(createVerifierPass());
+#endif
}
// Turn exception handling constructs into something the code generators can
OpenPOWER on IntegriCloud