[PATCH] D92625: Use isIgnored instead of checking pass name
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 3 17:44:36 PST 2020
aeubanks created this revision.
aeubanks added reviewers: ychen, dexonsmith.
Herald added a subscriber: hiraditya.
aeubanks requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
In preparation for https://reviews.llvm.org/D92616 which will remove
angle brackets from pass manager/adaptor names.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D92625
Files:
llvm/lib/Passes/StandardInstrumentations.cpp
Index: llvm/lib/Passes/StandardInstrumentations.cpp
===================================================================
--- llvm/lib/Passes/StandardInstrumentations.cpp
+++ llvm/lib/Passes/StandardInstrumentations.cpp
@@ -473,7 +473,7 @@
}
void PrintIRInstrumentation::printBeforePass(StringRef PassID, Any IR) {
- if (PassID.startswith("PassManager<") || PassID.contains("PassAdaptor<"))
+ if (isIgnored(PassID))
return;
// Saving Module for AfterPassInvalidated operations.
@@ -492,7 +492,7 @@
}
void PrintIRInstrumentation::printAfterPass(StringRef PassID, Any IR) {
- if (PassID.startswith("PassManager<") || PassID.contains("PassAdaptor<"))
+ if (isIgnored(PassID))
return;
if (!llvm::shouldPrintAfterPass(PassID))
@@ -509,7 +509,7 @@
if (!StoreModuleDesc || !llvm::shouldPrintAfterPass(PassID))
return;
- if (PassID.startswith("PassManager<") || PassID.contains("PassAdaptor<"))
+ if (isIgnored(PassID))
return;
const Module *M;
@@ -599,13 +599,9 @@
if (!isEnabled())
return;
- std::vector<StringRef> SpecialPasses = {"PassManager", "PassAdaptor"};
-
- PIC.registerShouldRunOptionalPassCallback(
- [this, SpecialPasses](StringRef PassID, Any IR) {
- return isSpecialPass(PassID, SpecialPasses) ||
- checkPass(PassID, getBisectDescription(IR));
- });
+ PIC.registerShouldRunOptionalPassCallback([this](StringRef PassID, Any IR) {
+ return isIgnored(PassID) || checkPass(PassID, getBisectDescription(IR));
+ });
}
void PrintPassInstrumentation::registerCallbacks(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92625.309420.patch
Type: text/x-patch
Size: 1574 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201204/7f070012/attachment.bin>
More information about the llvm-commits
mailing list