From 99e4b3927c5b8700b818ca2436f3c8394245e97c Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Mon, 21 Apr 2025 12:36:34 -0700 Subject: [LLVM] Cleanup pass initialization for Analysis passes (#135858) - Do not call pass initialization from pass constructors. - Instead, pass initialization should happen in the `initializeAnalysis` function. - https://github.com/llvm/llvm-project/issues/111767 --- llvm/lib/Analysis/ModuleSummaryAnalysis.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp') diff --git a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp index 5693e23..4b50f1e 100644 --- a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp +++ b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp @@ -1156,9 +1156,7 @@ ModulePass *llvm::createModuleSummaryIndexWrapperPass() { } ModuleSummaryIndexWrapperPass::ModuleSummaryIndexWrapperPass() - : ModulePass(ID) { - initializeModuleSummaryIndexWrapperPassPass(*PassRegistry::getPassRegistry()); -} + : ModulePass(ID) {} bool ModuleSummaryIndexWrapperPass::runOnModule(Module &M) { auto *PSI = &getAnalysis().getPSI(); @@ -1196,10 +1194,7 @@ char ImmutableModuleSummaryIndexWrapperPass::ID = 0; ImmutableModuleSummaryIndexWrapperPass::ImmutableModuleSummaryIndexWrapperPass( const ModuleSummaryIndex *Index) - : ImmutablePass(ID), Index(Index) { - initializeImmutableModuleSummaryIndexWrapperPassPass( - *PassRegistry::getPassRegistry()); -} + : ImmutablePass(ID), Index(Index) {} void ImmutableModuleSummaryIndexWrapperPass::getAnalysisUsage( AnalysisUsage &AU) const { -- cgit v1.1