[llvm-branch-commits] [llvm] 0173eb0 - Use isIgnored instead of checking pass name
Arthur Eubanks via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Dec 3 18:43:24 PST 2020
Author: Arthur Eubanks
Date: 2020-12-03T18:37:57-08:00
New Revision: 0173eb0faf7ba500865d9e043685c37fc00cf679
URL: https://github.com/llvm/llvm-project/commit/0173eb0faf7ba500865d9e043685c37fc00cf679
DIFF: https://github.com/llvm/llvm-project/commit/0173eb0faf7ba500865d9e043685c37fc00cf679.diff
LOG: Use isIgnored instead of checking pass name
In preparation for https://reviews.llvm.org/D92616 which will remove
angle brackets from pass manager/adaptor names.
Reviewed By: dexonsmith, thakis
Differential Revision: https://reviews.llvm.org/D92625
Added:
Modified:
llvm/lib/Passes/StandardInstrumentations.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Passes/StandardInstrumentations.cpp b/llvm/lib/Passes/StandardInstrumentations.cpp
index abbab4959fe4..ba713acef411 100644
--- a/llvm/lib/Passes/StandardInstrumentations.cpp
+++ b/llvm/lib/Passes/StandardInstrumentations.cpp
@@ -474,7 +474,7 @@ PrintIRInstrumentation::popModuleDesc(StringRef PassID) {
}
void PrintIRInstrumentation::printBeforePass(StringRef PassID, Any IR) {
- if (PassID.startswith("PassManager<") || PassID.contains("PassAdaptor<"))
+ if (isIgnored(PassID))
return;
// Saving Module for AfterPassInvalidated operations.
@@ -493,7 +493,7 @@ void PrintIRInstrumentation::printBeforePass(StringRef PassID, Any IR) {
}
void PrintIRInstrumentation::printAfterPass(StringRef PassID, Any IR) {
- if (PassID.startswith("PassManager<") || PassID.contains("PassAdaptor<"))
+ if (isIgnored(PassID))
return;
if (!shouldPrintAfterPass(PassID))
@@ -511,7 +511,7 @@ void PrintIRInstrumentation::printAfterPassInvalidated(StringRef PassID) {
if (!StoreModuleDesc || !shouldPrintAfterPass(PassName))
return;
- if (PassID.startswith("PassManager<") || PassID.contains("PassAdaptor<"))
+ if (isIgnored(PassID))
return;
const Module *M;
@@ -627,13 +627,9 @@ void OptBisectInstrumentation::registerCallbacks(
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(
More information about the llvm-branch-commits
mailing list