[PATCH] D48723: Fix IRPrinting bug
Son Tuan Vu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 29 11:03:19 PDT 2018
tyb0807 updated this revision to Diff 153543.
tyb0807 added a comment.
Addressed review comment.
Repository:
rL LLVM
https://reviews.llvm.org/D48723
Files:
lib/IR/IRPrintingPasses.cpp
test/Other/printer.ll
Index: test/Other/printer.ll
===================================================================
--- /dev/null
+++ test/Other/printer.ll
@@ -0,0 +1,13 @@
+; RUN: opt -mem2reg -instcombine -print-after-all -S < %s 2>&1 | FileCheck %s
+define void @tester(){
+ ret void
+}
+
+define void @foo(){
+ ret void
+}
+
+;CHECK: IR Dump After Promote Memory to Register
+;CHECK: IR Dump After Combine redundant instructions
+;CHECK: IR Dump After Module Verifier
+;CHECK-NOT: IR Dump After Print Module IR
Index: lib/IR/IRPrintingPasses.cpp
===================================================================
--- lib/IR/IRPrintingPasses.cpp
+++ lib/IR/IRPrintingPasses.cpp
@@ -127,13 +127,13 @@
char PrintModulePassWrapper::ID = 0;
INITIALIZE_PASS(PrintModulePassWrapper, "print-module",
- "Print module to stderr", false, false)
+ "Print module to stderr", false, true)
char PrintFunctionPassWrapper::ID = 0;
INITIALIZE_PASS(PrintFunctionPassWrapper, "print-function",
- "Print function to stderr", false, false)
+ "Print function to stderr", false, true)
char PrintBasicBlockPass::ID = 0;
INITIALIZE_PASS(PrintBasicBlockPass, "print-bb", "Print BB to stderr", false,
- false)
+ true)
ModulePass *llvm::createPrintModulePass(llvm::raw_ostream &OS,
const std::string &Banner,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48723.153543.patch
Type: text/x-patch
Size: 1410 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180629/fbc369d1/attachment.bin>
More information about the llvm-commits
mailing list