diff options
author | Dan Gohman <gohman@apple.com> | 2010-01-21 03:51:36 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-01-21 03:51:36 +0000 |
commit | fca37064789620d80580bc19281ef30141e25dc1 (patch) | |
tree | e56fb978e20353148454063bf19824e35d67b85e /lib/CodeGen/LLVMTargetMachine.cpp | |
parent | a10756ee657a4d43a48cca5c166919093930ed6b (diff) | |
download | llvm-fca37064789620d80580bc19281ef30141e25dc1.tar.gz |
Run the verifier after LSR, to help catch use-before-def errors before
they reach codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94066 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r-- | lib/CodeGen/LLVMTargetMachine.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp index 837e1848aa50..c761f8dd9279 100644 --- a/lib/CodeGen/LLVMTargetMachine.cpp +++ b/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 |