From fd03ac6a0c7e2092ae9c0a05f229a1a2dd4608ae Mon Sep 17 00:00:00 2001 From: Sean Silva Date: Tue, 9 Aug 2016 00:28:38 +0000 Subject: [PATCH] Consistently use ModuleAnalysisManager Besides a general consistently benefit, the extra layer of indirection allows the mechanical part of https://reviews.llvm.org/D23256 that requires touching every transformation and analysis to be factored out cleanly. Thanks to David for the suggestion. llvm-svn: 278078 --- llvm/include/llvm/Analysis/CallGraph.h | 2 +- llvm/include/llvm/Analysis/GlobalsModRef.h | 2 +- llvm/include/llvm/Analysis/ProfileSummaryInfo.h | 2 +- llvm/include/llvm/Transforms/GCOVProfiler.h | 2 +- llvm/include/llvm/Transforms/IPO/CrossDSOCFI.h | 2 +- llvm/include/llvm/Transforms/IPO/FunctionAttrs.h | 2 +- llvm/include/llvm/Transforms/IPO/FunctionImport.h | 2 +- llvm/include/llvm/Transforms/IPO/GlobalOpt.h | 2 +- llvm/include/llvm/Transforms/IPO/InferFunctionAttrs.h | 2 +- llvm/include/llvm/Transforms/IPO/Internalize.h | 2 +- llvm/include/llvm/Transforms/IPO/LowerTypeTests.h | 2 +- llvm/include/llvm/Transforms/IPO/SCCP.h | 2 +- llvm/include/llvm/Transforms/InstrProfiling.h | 2 +- llvm/include/llvm/Transforms/PGOInstrumentation.h | 6 +++--- llvm/include/llvm/Transforms/SampleProfile.h | 2 +- llvm/lib/Analysis/CallGraph.cpp | 2 +- llvm/lib/Analysis/GlobalsModRef.cpp | 2 +- llvm/lib/Analysis/ProfileSummaryInfo.cpp | 2 +- llvm/lib/IR/IRPrintingPasses.cpp | 2 +- llvm/lib/Passes/PassBuilder.cpp | 4 ++-- llvm/lib/Transforms/IPO/CrossDSOCFI.cpp | 2 +- llvm/lib/Transforms/IPO/FunctionAttrs.cpp | 2 +- llvm/lib/Transforms/IPO/FunctionImport.cpp | 2 +- llvm/lib/Transforms/IPO/GlobalOpt.cpp | 2 +- llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp | 2 +- llvm/lib/Transforms/IPO/Internalize.cpp | 2 +- llvm/lib/Transforms/IPO/LowerTypeTests.cpp | 2 +- llvm/lib/Transforms/IPO/SampleProfile.cpp | 2 +- llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp | 2 +- llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp | 2 +- llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp | 2 +- llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp | 4 ++-- llvm/lib/Transforms/Scalar/SCCP.cpp | 2 +- 33 files changed, 37 insertions(+), 37 deletions(-) diff --git a/llvm/include/llvm/Analysis/CallGraph.h b/llvm/include/llvm/Analysis/CallGraph.h index f37e843..2346ef7 100644 --- a/llvm/include/llvm/Analysis/CallGraph.h +++ b/llvm/include/llvm/Analysis/CallGraph.h @@ -315,7 +315,7 @@ class CallGraphPrinterPass : public PassInfoMixin { public: explicit CallGraphPrinterPass(raw_ostream &OS) : OS(OS) {} - PreservedAnalyses run(Module &M, AnalysisManager &AM); + PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); }; /// \brief The \c ModulePass which wraps up a \c CallGraph and the logic to diff --git a/llvm/include/llvm/Analysis/GlobalsModRef.h b/llvm/include/llvm/Analysis/GlobalsModRef.h index 4c0a989..eff85f3 100644 --- a/llvm/include/llvm/Analysis/GlobalsModRef.h +++ b/llvm/include/llvm/Analysis/GlobalsModRef.h @@ -125,7 +125,7 @@ class GlobalsAA : public AnalysisInfoMixin { public: typedef GlobalsAAResult Result; - GlobalsAAResult run(Module &M, AnalysisManager &AM); + GlobalsAAResult run(Module &M, ModuleAnalysisManager &AM); }; /// Legacy wrapper pass to provide the GlobalsAAResult object. diff --git a/llvm/include/llvm/Analysis/ProfileSummaryInfo.h b/llvm/include/llvm/Analysis/ProfileSummaryInfo.h index cd624c8..61fc417 100644 --- a/llvm/include/llvm/Analysis/ProfileSummaryInfo.h +++ b/llvm/include/llvm/Analysis/ProfileSummaryInfo.h @@ -105,7 +105,7 @@ class ProfileSummaryPrinterPass public: explicit ProfileSummaryPrinterPass(raw_ostream &OS) : OS(OS) {} - PreservedAnalyses run(Module &M, AnalysisManager &AM); + PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); }; } // end namespace llvm diff --git a/llvm/include/llvm/Transforms/GCOVProfiler.h b/llvm/include/llvm/Transforms/GCOVProfiler.h index f652190..66bd75c 100644 --- a/llvm/include/llvm/Transforms/GCOVProfiler.h +++ b/llvm/include/llvm/Transforms/GCOVProfiler.h @@ -21,7 +21,7 @@ namespace llvm { class GCOVProfilerPass : public PassInfoMixin { public: GCOVProfilerPass(const GCOVOptions &Options = GCOVOptions::getDefault()) : GCOVOpts(Options) { } - PreservedAnalyses run(Module &M, AnalysisManager &AM); + PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); private: GCOVOptions GCOVOpts; diff --git a/llvm/include/llvm/Transforms/IPO/CrossDSOCFI.h b/llvm/include/llvm/Transforms/IPO/CrossDSOCFI.h index 409604a..0979f5b 100644 --- a/llvm/include/llvm/Transforms/IPO/CrossDSOCFI.h +++ b/llvm/include/llvm/Transforms/IPO/CrossDSOCFI.h @@ -21,7 +21,7 @@ namespace llvm { class CrossDSOCFIPass : public PassInfoMixin { public: - PreservedAnalyses run(Module &M, AnalysisManager &AM); + PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); }; } #endif // LLVM_TRANSFORMS_IPO_CROSSDSOCFI_H diff --git a/llvm/include/llvm/Transforms/IPO/FunctionAttrs.h b/llvm/include/llvm/Transforms/IPO/FunctionAttrs.h index c44cc43..e67bcae 100644 --- a/llvm/include/llvm/Transforms/IPO/FunctionAttrs.h +++ b/llvm/include/llvm/Transforms/IPO/FunctionAttrs.h @@ -50,7 +50,7 @@ Pass *createPostOrderFunctionAttrsLegacyPass(); class ReversePostOrderFunctionAttrsPass : public PassInfoMixin { public: - PreservedAnalyses run(Module &M, AnalysisManager &AM); + PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); }; } diff --git a/llvm/include/llvm/Transforms/IPO/FunctionImport.h b/llvm/include/llvm/Transforms/IPO/FunctionImport.h index 5f1f6a4..2f0bdedf 100644 --- a/llvm/include/llvm/Transforms/IPO/FunctionImport.h +++ b/llvm/include/llvm/Transforms/IPO/FunctionImport.h @@ -69,7 +69,7 @@ class FunctionImportPass : public PassInfoMixin { public: FunctionImportPass(const ModuleSummaryIndex *Index = nullptr) : Index(Index) {} - PreservedAnalyses run(Module &M, AnalysisManager &AM); + PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); private: const ModuleSummaryIndex *Index; diff --git a/llvm/include/llvm/Transforms/IPO/GlobalOpt.h b/llvm/include/llvm/Transforms/IPO/GlobalOpt.h index 5a25a6d..ab91168 100644 --- a/llvm/include/llvm/Transforms/IPO/GlobalOpt.h +++ b/llvm/include/llvm/Transforms/IPO/GlobalOpt.h @@ -24,7 +24,7 @@ namespace llvm { /// Optimize globals that never have their address taken. class GlobalOptPass : public PassInfoMixin { public: - PreservedAnalyses run(Module &M, AnalysisManager &AM); + PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); }; } diff --git a/llvm/include/llvm/Transforms/IPO/InferFunctionAttrs.h b/llvm/include/llvm/Transforms/IPO/InferFunctionAttrs.h index f5cbf9e..54e1c24 100644 --- a/llvm/include/llvm/Transforms/IPO/InferFunctionAttrs.h +++ b/llvm/include/llvm/Transforms/IPO/InferFunctionAttrs.h @@ -24,7 +24,7 @@ namespace llvm { /// A pass which infers function attributes from the names and signatures of /// function declarations in a module. struct InferFunctionAttrsPass : PassInfoMixin { - PreservedAnalyses run(Module &M, AnalysisManager &AM); + PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); }; /// Create a legacy pass manager instance of a pass to infer function diff --git a/llvm/include/llvm/Transforms/IPO/Internalize.h b/llvm/include/llvm/Transforms/IPO/Internalize.h index ba1b068..45d676d 100644 --- a/llvm/include/llvm/Transforms/IPO/Internalize.h +++ b/llvm/include/llvm/Transforms/IPO/Internalize.h @@ -63,7 +63,7 @@ public: /// internalizing a function (by removing any edge from the "external node") bool internalizeModule(Module &TheModule, CallGraph *CG = nullptr); - PreservedAnalyses run(Module &M, AnalysisManager &AM); + PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); }; /// Helper function to internalize functions and variables in a Module. diff --git a/llvm/include/llvm/Transforms/IPO/LowerTypeTests.h b/llvm/include/llvm/Transforms/IPO/LowerTypeTests.h index 93d4fb9..23c59c1 100644 --- a/llvm/include/llvm/Transforms/IPO/LowerTypeTests.h +++ b/llvm/include/llvm/Transforms/IPO/LowerTypeTests.h @@ -205,7 +205,7 @@ struct ByteArrayBuilder { class LowerTypeTestsPass : public PassInfoMixin { public: - PreservedAnalyses run(Module &M, AnalysisManager &AM); + PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); }; } // end namespace llvm diff --git a/llvm/include/llvm/Transforms/IPO/SCCP.h b/llvm/include/llvm/Transforms/IPO/SCCP.h index fab7313..7082006 100644 --- a/llvm/include/llvm/Transforms/IPO/SCCP.h +++ b/llvm/include/llvm/Transforms/IPO/SCCP.h @@ -28,7 +28,7 @@ namespace llvm { /// Pass to perform interprocedural constant propagation. class IPSCCPPass : public PassInfoMixin { public: - PreservedAnalyses run(Module &M, AnalysisManager &AM); + PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); }; } #endif // LLVM_TRANSFORMS_IPO_SCCP_H diff --git a/llvm/include/llvm/Transforms/InstrProfiling.h b/llvm/include/llvm/Transforms/InstrProfiling.h index 9ac6d63..9c61dce 100644 --- a/llvm/include/llvm/Transforms/InstrProfiling.h +++ b/llvm/include/llvm/Transforms/InstrProfiling.h @@ -29,7 +29,7 @@ public: InstrProfiling() {} InstrProfiling(const InstrProfOptions &Options) : Options(Options) {} - PreservedAnalyses run(Module &M, AnalysisManager &AM); + PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); bool run(Module &M); private: diff --git a/llvm/include/llvm/Transforms/PGOInstrumentation.h b/llvm/include/llvm/Transforms/PGOInstrumentation.h index f6b5639..1b449c9 100644 --- a/llvm/include/llvm/Transforms/PGOInstrumentation.h +++ b/llvm/include/llvm/Transforms/PGOInstrumentation.h @@ -22,13 +22,13 @@ namespace llvm { /// The instrumentation (profile-instr-gen) pass for IR based PGO. class PGOInstrumentationGen : public PassInfoMixin { public: - PreservedAnalyses run(Module &M, AnalysisManager &AM); + PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); }; /// The profile annotation (profile-instr-use) pass for IR based PGO. class PGOInstrumentationUse : public PassInfoMixin { public: - PreservedAnalyses run(Module &M, AnalysisManager &AM); + PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); PGOInstrumentationUse(std::string Filename = ""); private: @@ -39,7 +39,7 @@ private: class PGOIndirectCallPromotion : public PassInfoMixin { public: PGOIndirectCallPromotion(bool IsInLTO = false) : InLTO(IsInLTO) {} - PreservedAnalyses run(Module &M, AnalysisManager &AM); + PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); private: bool InLTO; }; diff --git a/llvm/include/llvm/Transforms/SampleProfile.h b/llvm/include/llvm/Transforms/SampleProfile.h index 0fdfa2f..93fa953 100644 --- a/llvm/include/llvm/Transforms/SampleProfile.h +++ b/llvm/include/llvm/Transforms/SampleProfile.h @@ -20,7 +20,7 @@ namespace llvm { /// The sample profiler data loader pass. class SampleProfileLoaderPass : public PassInfoMixin { public: - PreservedAnalyses run(Module &M, AnalysisManager &AM); + PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); }; } // End llvm namespace diff --git a/llvm/lib/Analysis/CallGraph.cpp b/llvm/lib/Analysis/CallGraph.cpp index 39cb86d..adf378b 100644 --- a/llvm/lib/Analysis/CallGraph.cpp +++ b/llvm/lib/Analysis/CallGraph.cpp @@ -261,7 +261,7 @@ void CallGraphNode::replaceCallEdge(CallSite CS, char CallGraphAnalysis::PassID; PreservedAnalyses CallGraphPrinterPass::run(Module &M, - AnalysisManager &AM) { + ModuleAnalysisManager &AM) { AM.getResult(M).print(OS); return PreservedAnalyses::all(); } diff --git a/llvm/lib/Analysis/GlobalsModRef.cpp b/llvm/lib/Analysis/GlobalsModRef.cpp index a7d1e04..a7cf134 100644 --- a/llvm/lib/Analysis/GlobalsModRef.cpp +++ b/llvm/lib/Analysis/GlobalsModRef.cpp @@ -939,7 +939,7 @@ GlobalsAAResult::analyzeModule(Module &M, const TargetLibraryInfo &TLI, char GlobalsAA::PassID; -GlobalsAAResult GlobalsAA::run(Module &M, AnalysisManager &AM) { +GlobalsAAResult GlobalsAA::run(Module &M, ModuleAnalysisManager &AM) { return GlobalsAAResult::analyzeModule(M, AM.getResult(M), AM.getResult(M)); diff --git a/llvm/lib/Analysis/ProfileSummaryInfo.cpp b/llvm/lib/Analysis/ProfileSummaryInfo.cpp index 9cf99af..300b265 100644 --- a/llvm/lib/Analysis/ProfileSummaryInfo.cpp +++ b/llvm/lib/Analysis/ProfileSummaryInfo.cpp @@ -148,7 +148,7 @@ ProfileSummaryInfo ProfileSummaryAnalysis::run(Module &M, // FIXME: This only tests isHotFunction and isColdFunction and not the // isHotCount and isColdCount calls. PreservedAnalyses ProfileSummaryPrinterPass::run(Module &M, - AnalysisManager &AM) { + ModuleAnalysisManager &AM) { ProfileSummaryInfo &PSI = AM.getResult(M); OS << "Functions in " << M.getName() << " with hot/cold annotations: \n"; diff --git a/llvm/lib/IR/IRPrintingPasses.cpp b/llvm/lib/IR/IRPrintingPasses.cpp index 4ee4f1f..05e206c 100644 --- a/llvm/lib/IR/IRPrintingPasses.cpp +++ b/llvm/lib/IR/IRPrintingPasses.cpp @@ -26,7 +26,7 @@ PrintModulePass::PrintModulePass(raw_ostream &OS, const std::string &Banner, : OS(OS), Banner(Banner), ShouldPreserveUseListOrder(ShouldPreserveUseListOrder) {} -PreservedAnalyses PrintModulePass::run(Module &M, AnalysisManager &) { +PreservedAnalyses PrintModulePass::run(Module &M, ModuleAnalysisManager &) { OS << Banner; if (llvm::isFunctionInPrintList("*")) M.print(OS, nullptr, ShouldPreserveUseListOrder); diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp index ddddbc1..e06a2fe 100644 --- a/llvm/lib/Passes/PassBuilder.cpp +++ b/llvm/lib/Passes/PassBuilder.cpp @@ -135,7 +135,7 @@ namespace { /// \brief No-op module pass which does nothing. struct NoOpModulePass { - PreservedAnalyses run(Module &M, AnalysisManager &) { + PreservedAnalyses run(Module &M, ModuleAnalysisManager &) { return PreservedAnalyses::all(); } static StringRef name() { return "NoOpModulePass"; } @@ -148,7 +148,7 @@ class NoOpModuleAnalysis : public AnalysisInfoMixin { public: struct Result {}; - Result run(Module &, AnalysisManager &) { return Result(); } + Result run(Module &, ModuleAnalysisManager &) { return Result(); } static StringRef name() { return "NoOpModuleAnalysis"; } }; diff --git a/llvm/lib/Transforms/IPO/CrossDSOCFI.cpp b/llvm/lib/Transforms/IPO/CrossDSOCFI.cpp index 58731ea..ba2e60d 100644 --- a/llvm/lib/Transforms/IPO/CrossDSOCFI.cpp +++ b/llvm/lib/Transforms/IPO/CrossDSOCFI.cpp @@ -155,7 +155,7 @@ bool CrossDSOCFI::runOnModule(Module &M) { return true; } -PreservedAnalyses CrossDSOCFIPass::run(Module &M, AnalysisManager &AM) { +PreservedAnalyses CrossDSOCFIPass::run(Module &M, ModuleAnalysisManager &AM) { CrossDSOCFI Impl; bool Changed = Impl.runOnModule(M); if (!Changed) diff --git a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp index 6496f3a..273e5e2 100644 --- a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp +++ b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp @@ -1267,7 +1267,7 @@ bool ReversePostOrderFunctionAttrsLegacyPass::runOnModule(Module &M) { } PreservedAnalyses -ReversePostOrderFunctionAttrsPass::run(Module &M, AnalysisManager &AM) { +ReversePostOrderFunctionAttrsPass::run(Module &M, ModuleAnalysisManager &AM) { auto &CG = AM.getResult(M); bool Changed = deduceFunctionAttributeInRPO(M, CG); diff --git a/llvm/lib/Transforms/IPO/FunctionImport.cpp b/llvm/lib/Transforms/IPO/FunctionImport.cpp index 25ef17c..7446a7d 100644 --- a/llvm/lib/Transforms/IPO/FunctionImport.cpp +++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp @@ -785,7 +785,7 @@ public: } // anonymous namespace PreservedAnalyses FunctionImportPass::run(Module &M, - AnalysisManager &AM) { + ModuleAnalysisManager &AM) { if (!doImportingForModule(M, Index)) return PreservedAnalyses::all(); diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp index 967aeb3..b68f8e9 100644 --- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp +++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp @@ -2565,7 +2565,7 @@ static bool optimizeGlobalsInModule( return Changed; } -PreservedAnalyses GlobalOptPass::run(Module &M, AnalysisManager &AM) { +PreservedAnalyses GlobalOptPass::run(Module &M, ModuleAnalysisManager &AM) { auto &DL = M.getDataLayout(); auto &TLI = AM.getResult(M); auto &FAM = diff --git a/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp b/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp index ab2d2bd..2ef299d 100644 --- a/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp +++ b/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp @@ -34,7 +34,7 @@ static bool inferAllPrototypeAttributes(Module &M, } PreservedAnalyses InferFunctionAttrsPass::run(Module &M, - AnalysisManager &AM) { + ModuleAnalysisManager &AM) { auto &TLI = AM.getResult(M); if (!inferAllPrototypeAttributes(M, TLI)) diff --git a/llvm/lib/Transforms/IPO/Internalize.cpp b/llvm/lib/Transforms/IPO/Internalize.cpp index 8c5c6f7..26db146 100644 --- a/llvm/lib/Transforms/IPO/Internalize.cpp +++ b/llvm/lib/Transforms/IPO/Internalize.cpp @@ -239,7 +239,7 @@ bool InternalizePass::internalizeModule(Module &M, CallGraph *CG) { InternalizePass::InternalizePass() : MustPreserveGV(PreserveAPIList()) {} -PreservedAnalyses InternalizePass::run(Module &M, AnalysisManager &AM) { +PreservedAnalyses InternalizePass::run(Module &M, ModuleAnalysisManager &AM) { if (!internalizeModule(M, AM.getCachedResult(M))) return PreservedAnalyses::all(); diff --git a/llvm/lib/Transforms/IPO/LowerTypeTests.cpp b/llvm/lib/Transforms/IPO/LowerTypeTests.cpp index 45fe568..7d1cd8e06 100644 --- a/llvm/lib/Transforms/IPO/LowerTypeTests.cpp +++ b/llvm/lib/Transforms/IPO/LowerTypeTests.cpp @@ -1061,7 +1061,7 @@ bool LowerTypeTests::runOnModule(Module &M) { } PreservedAnalyses LowerTypeTestsPass::run(Module &M, - AnalysisManager &AM) { + ModuleAnalysisManager &AM) { LowerTypeTests Impl; init(&Impl, M); bool Changed = Impl.lower(); diff --git a/llvm/lib/Transforms/IPO/SampleProfile.cpp b/llvm/lib/Transforms/IPO/SampleProfile.cpp index 6a74a93..1f2d544 100644 --- a/llvm/lib/Transforms/IPO/SampleProfile.cpp +++ b/llvm/lib/Transforms/IPO/SampleProfile.cpp @@ -1253,7 +1253,7 @@ bool SampleProfileLoader::runOnFunction(Function &F) { } PreservedAnalyses SampleProfileLoaderPass::run(Module &M, - AnalysisManager &AM) { + ModuleAnalysisManager &AM) { SampleProfileLoader SampleLoader(SampleProfileFile); diff --git a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp index 37f3cee..da07ea3 100644 --- a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp @@ -453,7 +453,7 @@ bool GCOVProfiler::runOnModule(Module &M) { } PreservedAnalyses GCOVProfilerPass::run(Module &M, - AnalysisManager &AM) { + ModuleAnalysisManager &AM) { GCOVProfiler Profiler(GCOVOpts); diff --git a/llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp b/llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp index 202b94b..3883484 100644 --- a/llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp +++ b/llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp @@ -653,7 +653,7 @@ bool PGOIndirectCallPromotionLegacyPass::runOnModule(Module &M) { return promoteIndirectCalls(M, InLTO | ICPLTOMode); } -PreservedAnalyses PGOIndirectCallPromotion::run(Module &M, AnalysisManager &AM) { +PreservedAnalyses PGOIndirectCallPromotion::run(Module &M, ModuleAnalysisManager &AM) { if (!promoteIndirectCalls(M, InLTO | ICPLTOMode)) return PreservedAnalyses::all(); diff --git a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp index 2b3d1cc..6ca49cf 100644 --- a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp @@ -66,7 +66,7 @@ public: } // anonymous namespace -PreservedAnalyses InstrProfiling::run(Module &M, AnalysisManager &AM) { +PreservedAnalyses InstrProfiling::run(Module &M, ModuleAnalysisManager &AM) { if (!run(M)) return PreservedAnalyses::all(); diff --git a/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp b/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp index 99154d8..f8bedb2 100644 --- a/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp +++ b/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp @@ -964,7 +964,7 @@ bool PGOInstrumentationGenLegacyPass::runOnModule(Module &M) { } PreservedAnalyses PGOInstrumentationGen::run(Module &M, - AnalysisManager &AM) { + ModuleAnalysisManager &AM) { auto &FAM = AM.getResult(M).getManager(); auto LookupBPI = [&FAM](Function &F) { @@ -1056,7 +1056,7 @@ PGOInstrumentationUse::PGOInstrumentationUse(std::string Filename) } PreservedAnalyses PGOInstrumentationUse::run(Module &M, - AnalysisManager &AM) { + ModuleAnalysisManager &AM) { auto &FAM = AM.getResult(M).getManager(); auto LookupBPI = [&FAM](Function &F) { diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp index 928a178..d068b15 100644 --- a/llvm/lib/Transforms/Scalar/SCCP.cpp +++ b/llvm/lib/Transforms/Scalar/SCCP.cpp @@ -1941,7 +1941,7 @@ static bool runIPSCCP(Module &M, const DataLayout &DL, return MadeChanges; } -PreservedAnalyses IPSCCPPass::run(Module &M, AnalysisManager &AM) { +PreservedAnalyses IPSCCPPass::run(Module &M, ModuleAnalysisManager &AM) { const DataLayout &DL = M.getDataLayout(); auto &TLI = AM.getResult(M); if (!runIPSCCP(M, DL, &TLI)) -- 2.7.4