Skip to content

Commit c680041

Browse files
committed
Remove references to registry
1 parent 230f33b commit c680041

File tree

7 files changed

+1
-59
lines changed

7 files changed

+1
-59
lines changed

llvm/include/llvm/Passes/PassBuilder.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,6 @@ class PassBuilder {
173173
/// additional analyses.
174174
LLVM_ABI void registerLoopAnalyses(LoopAnalysisManager &LAM);
175175

176-
/// Registers all available verifier passes.
177-
///
178-
/// This is an interface that can be used to populate a
179-
/// \c ModuleAnalysisManager with all registered loop analyses. Callers can
180-
/// still manually register any additional analyses.
181-
void registerVerifierPasses(ModulePassManager &PM, FunctionPassManager &);
182-
183176
/// Registers all available machine function analysis passes.
184177
///
185178
/// This is an interface that can be used to populate a \c
@@ -583,15 +576,6 @@ class PassBuilder {
583576
}
584577
/// @}}
585578

586-
/// Register a callback for parsing an Verifier Name to populate
587-
/// the given managers.
588-
void registerVerifierCallback(
589-
const std::function<bool(ModulePassManager &MPM)> &C,
590-
const std::function<bool(FunctionPassManager &MPM)> &CF) {
591-
VerifierCallbacks.push_back(C);
592-
FnVerifierCallbacks.push_back(CF);
593-
}
594-
595579
/// {{@ Register pipeline parsing callbacks with this pass builder instance.
596580
/// Using these callbacks, callers can parse both a single pass name, as well
597581
/// as entire sub-pipelines, and populate the PassManager instance
@@ -867,11 +851,6 @@ class PassBuilder {
867851
// Callbacks to parse `filter` parameter in register allocation passes
868852
SmallVector<std::function<RegAllocFilterFunc(StringRef)>, 2>
869853
RegClassFilterParsingCallbacks;
870-
// Verifier callbacks
871-
SmallVector<std::function<bool(ModulePassManager &)>, 2>
872-
VerifierCallbacks;
873-
SmallVector<std::function<bool(FunctionPassManager &)>, 2>
874-
FnVerifierCallbacks;
875854
};
876855

877856
/// This utility template takes care of adding require<> and invalidate<>

llvm/include/llvm/Passes/StandardInstrumentations.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ class StandardInstrumentations {
624624
// Register all the standard instrumentation callbacks. If \p FAM is nullptr
625625
// then PreservedCFGChecker is not enabled.
626626
LLVM_ABI void registerCallbacks(PassInstrumentationCallbacks &PIC,
627-
ModuleAnalysisManager *MAM);
627+
ModuleAnalysisManager *MAM);
628628

629629
TimePassesHandler &getTimePasses() { return TimePasses; }
630630
};

llvm/include/llvm/Passes/TargetPassRegistry.inc

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -151,18 +151,6 @@ PB.registerPipelineParsingCallback([=](StringRef Name, FunctionPassManager &PM,
151151
return false;
152152
});
153153

154-
PB.registerVerifierCallback([](ModulePassManager &PM) {
155-
#define VERIFIER_MODULE_ANALYSIS(NAME, CREATE_PASS) PM.addPass(CREATE_PASS)
156-
#include GET_PASS_REGISTRY
157-
#undef VERIFIER_MODULE_ANALYSIS
158-
return false;
159-
}, [](FunctionPassManager &FPM) {
160-
#define VERIFIER_FUNCTION_ANALYSIS(NAME, CREATE_PASS) FPM.addPass(CREATE_PASS)
161-
#include GET_PASS_REGISTRY
162-
#undef VERIFIER_FUNCTION_ANALYSIS
163-
return false;
164-
});
165-
166154
#undef ADD_PASS
167155
#undef ADD_PASS_WITH_PARAMS
168156

llvm/lib/Passes/PassBuilder.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -576,13 +576,6 @@ void PassBuilder::registerLoopAnalyses(LoopAnalysisManager &LAM) {
576576
C(LAM);
577577
}
578578

579-
void PassBuilder::registerVerifierPasses(ModulePassManager &MPM, FunctionPassManager &FPM) {
580-
for (auto &C : VerifierCallbacks)
581-
C(MPM);
582-
for (auto &C : FnVerifierCallbacks)
583-
C(FPM);
584-
}
585-
586579
static std::optional<std::pair<bool, bool>>
587580
parseFunctionPipelineName(StringRef Name) {
588581
std::pair<bool, bool> Params;

llvm/lib/Target/AMDGPU/AMDGPUPassRegistry.def

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,6 @@ FUNCTION_ALIAS_ANALYSIS("amdgpu-aa", AMDGPUAA())
8282
#undef FUNCTION_ALIAS_ANALYSIS
8383
#undef FUNCTION_ANALYSIS
8484

85-
#ifndef VERIFIER_MODULE_ANALYSIS
86-
#define VERIFIER_MODULE_ANALYSIS(NAME, CREATE_PASS)
87-
#endif
88-
#ifndef VERIFIER_FUNCTION_ANALYSIS
89-
#define VERIFIER_FUNCTION_ANALYSIS(NAME, CREATE_PASS)
90-
#endif
91-
VERIFIER_MODULE_ANALYSIS("verifier", VerifierPass())
92-
VERIFIER_FUNCTION_ANALYSIS("amdgpu-tgtverifier", AMDGPUTargetVerifierPass())
93-
#undef VERIFIER_MODULE_ANALYSIS
94-
#undef VERIFIER_FUNCTION_ANALYSIS
95-
9685
#ifndef FUNCTION_PASS_WITH_PARAMS
9786
#define FUNCTION_PASS_WITH_PARAMS(NAME, CLASS, CREATE_PASS, PARSER, PARAMS)
9887
#endif

llvm/tools/llc/NewPMDriver.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ static cl::opt<bool>
5757
DebugPM("debug-pass-manager", cl::Hidden,
5858
cl::desc("Print pass management debugging information"));
5959

60-
static cl::opt<bool> VerifyTarget("verify-tgt-new-pm",
61-
cl::desc("Verify the target"));
62-
6360
bool LLCDiagnosticHandler::handleDiagnostics(const DiagnosticInfo &DI) {
6461
DiagnosticHandler::handleDiagnostics(DI);
6562
if (DI.getKind() == llvm::DK_SrcMgr) {
@@ -128,8 +125,6 @@ int llvm::compileModuleWithNewPM(
128125
PB.registerFunctionAnalyses(FAM);
129126
PB.registerLoopAnalyses(LAM);
130127
PB.registerMachineFunctionAnalyses(MFAM);
131-
if (VerifyTarget)
132-
PB.registerVerifierPasses(MPM, FPM);
133128
PB.crossRegisterProxies(LAM, FAM, CGAM, MAM, &MFAM);
134129
SI.registerCallbacks(PIC, &MAM);
135130

llvm/tools/llc/llc.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,6 @@ static cl::opt<std::string> PassPipeline(
209209
static cl::alias PassPipeline2("p", cl::aliasopt(PassPipeline),
210210
cl::desc("Alias for -passes"));
211211

212-
static cl::opt<bool> VerifyTarget("verify-tgt", cl::desc("Verify the target"));
213-
214212
namespace {
215213

216214
std::vector<std::string> &getRunPassNames() {

0 commit comments

Comments
 (0)