[llvm-commits] [llvm] r159227 - in /llvm/trunk: test/CodeGen/Generic/print-after.ll tools/llc/llc.cpp
Rafael Espindola
rafael.espindola at gmail.com
Tue Jun 26 14:33:36 PDT 2012
Author: rafael
Date: Tue Jun 26 16:33:36 2012
New Revision: 159227
URL: http://llvm.org/viewvc/llvm-project?rev=159227&view=rev
Log:
Fix llc's -print-before=pass and -print-after=pass.
Added:
llvm/trunk/test/CodeGen/Generic/print-after.ll
Modified:
llvm/trunk/tools/llc/llc.cpp
Added: llvm/trunk/test/CodeGen/Generic/print-after.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/print-after.ll?rev=159227&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/Generic/print-after.ll (added)
+++ llvm/trunk/test/CodeGen/Generic/print-after.ll Tue Jun 26 16:33:36 2012
@@ -0,0 +1,6 @@
+; RUN: not llc --help-hidden |& FileCheck %s
+
+; CHECK: -print-after
+; CHECK-NOT: -print-after-all
+; CHECK: =simple-register-coalescing
+; CHECK: -print-after-all
Modified: llvm/trunk/tools/llc/llc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=159227&r1=159226&r2=159227&view=diff
==============================================================================
--- llvm/trunk/tools/llc/llc.cpp (original)
+++ llvm/trunk/tools/llc/llc.cpp Tue Jun 26 16:33:36 2012
@@ -353,6 +353,10 @@
InitializeAllAsmPrinters();
InitializeAllAsmParsers();
+ // Initialize codegen so that the -print-after and -print-before options
+ // work.
+ initializeCodeGen(*PassRegistry::getPassRegistry());
+
// Register the target printer for --version.
cl::AddExtraVersionPrinter(TargetRegistry::printRegisteredTargetsForVersion);
More information about the llvm-commits
mailing list