[llvm-commits] [llvm] r94066 - /llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp

Dan Gohman gohman at apple.com
Wed Jan 20 19:51:36 PST 2010


Author: djg
Date: Wed Jan 20 21:51:36 2010
New Revision: 94066

URL: http://llvm.org/viewvc/llvm-project?rev=94066&view=rev
Log:
Run the verifier after LSR, to help catch use-before-def errors before
they reach codegen.

Modified:
    llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp

Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=94066&r1=94065&r2=94066&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original)
+++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Wed Jan 20 21:51:36 2010
@@ -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 @@
     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





More information about the llvm-commits mailing list