forked from OSchip/llvm-project
Run the verifier after LSR, to help catch use-before-def errors before
they reach codegen. llvm-svn: 94066
This commit is contained in:
parent
87f2f9b465
commit
55a365e797
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue