llvm.org GIT mirror llvm / 15753b0
IR: Skip -print-*-all after -print-* This changes `-print-*` from transformation passes to analysis passes so that `-print-after-all` and `-print-before-all` don't trigger. This avoids some redundant output. Patch by Son Tuan Vu! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336869 91177308-0d34-0410-b5e6-96231b3b80d8 Duncan P. N. Exon Smith 1 year, 2 months ago
2 changed file(s) with 16 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
126126
127127 char PrintModulePassWrapper::ID = 0;
128128 INITIALIZE_PASS(PrintModulePassWrapper, "print-module",
129 "Print module to stderr", false, false)
129 "Print module to stderr", false, true)
130130 char PrintFunctionPassWrapper::ID = 0;
131131 INITIALIZE_PASS(PrintFunctionPassWrapper, "print-function",
132 "Print function to stderr", false, false)
132 "Print function to stderr", false, true)
133133 char PrintBasicBlockPass::ID = 0;
134134 INITIALIZE_PASS(PrintBasicBlockPass, "print-bb", "Print BB to stderr", false,
135 false)
135 true)
136136
137137 ModulePass *llvm::createPrintModulePass(llvm::raw_ostream &OS,
138138 const std::string &Banner,
0 ; RUN: opt -mem2reg -instcombine -print-after-all -S < %s 2>&1 | FileCheck %s
1 define void @tester(){
2 ret void
3 }
4
5 define void @foo(){
6 ret void
7 }
8
9 ;CHECK: IR Dump After Promote Memory to Register
10 ;CHECK: IR Dump After Combine redundant instructions
11 ;CHECK: IR Dump After Module Verifier
12 ;CHECK-NOT: IR Dump After Print Module IR