[PATCH] D147394: [NewPM] Use PassID instead of pass name
Prem Chintalapudi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 13 17:33:58 PDT 2023
pchintalapudi updated this revision to Diff 513396.
pchintalapudi added a comment.
Fix test
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147394/new/
https://reviews.llvm.org/D147394
Files:
llvm/lib/Passes/StandardInstrumentations.cpp
llvm/test/Other/loop-print-after-pass-invalidated.ll
Index: llvm/test/Other/loop-print-after-pass-invalidated.ll
===================================================================
--- /dev/null
+++ llvm/test/Other/loop-print-after-pass-invalidated.ll
@@ -0,0 +1,21 @@
+; RUN: opt < %s 2>&1 -disable-output \
+; RUN: -passes='loop(simple-loop-unswitch)' -enable-nontrivial-unswitch \
+; RUN: -print-after=simple-loop-unswitch \
+; RUN: | FileCheck %s
+
+; CHECK: *** IR Dump After SimpleLoopUnswitchPass on for.cond ***
+; CHECK: *** IR Dump After SimpleLoopUnswitchPass on for.cond.us ***
+
+define void @loop(i1 %w) {
+entry:
+ br label %for.cond
+; Loop:
+for.cond: ; preds = %for.inc, %entry
+ br i1 %w, label %for.inc, label %if.then
+
+if.then: ; preds = %for.cond
+ br label %for.inc
+
+for.inc: ; preds = %if.then, %for.cond
+ br label %for.cond
+}
Index: llvm/lib/Passes/StandardInstrumentations.cpp
===================================================================
--- llvm/lib/Passes/StandardInstrumentations.cpp
+++ llvm/lib/Passes/StandardInstrumentations.cpp
@@ -726,8 +726,7 @@
}
void PrintIRInstrumentation::printAfterPassInvalidated(StringRef PassID) {
- StringRef PassName = PIC->getPassNameForClassName(PassID);
- if (!shouldPrintAfterPass(PassName))
+ if (!shouldPrintAfterPass(PassID))
return;
if (isIgnored(PassID))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147394.513396.patch
Type: text/x-patch
Size: 1442 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230414/3675310e/attachment.bin>
More information about the llvm-commits
mailing list