[llvm] r278078 - Consistently use ModuleAnalysisManager

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 8 17:28:39 PDT 2016


Author: silvas
Date: Mon Aug  8 19:28:38 2016
New Revision: 278078

URL: http://llvm.org/viewvc/llvm-project?rev=278078&view=rev
Log:
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.

Modified:
    llvm/trunk/include/llvm/Analysis/CallGraph.h
    llvm/trunk/include/llvm/Analysis/GlobalsModRef.h
    llvm/trunk/include/llvm/Analysis/ProfileSummaryInfo.h
    llvm/trunk/include/llvm/Transforms/GCOVProfiler.h
    llvm/trunk/include/llvm/Transforms/IPO/CrossDSOCFI.h
    llvm/trunk/include/llvm/Transforms/IPO/FunctionAttrs.h
    llvm/trunk/include/llvm/Transforms/IPO/FunctionImport.h
    llvm/trunk/include/llvm/Transforms/IPO/GlobalOpt.h
    llvm/trunk/include/llvm/Transforms/IPO/InferFunctionAttrs.h
    llvm/trunk/include/llvm/Transforms/IPO/Internalize.h
    llvm/trunk/include/llvm/Transforms/IPO/LowerTypeTests.h
    llvm/trunk/include/llvm/Transforms/IPO/SCCP.h
    llvm/trunk/include/llvm/Transforms/InstrProfiling.h
    llvm/trunk/include/llvm/Transforms/PGOInstrumentation.h
    llvm/trunk/include/llvm/Transforms/SampleProfile.h
    llvm/trunk/lib/Analysis/CallGraph.cpp
    llvm/trunk/lib/Analysis/GlobalsModRef.cpp
    llvm/trunk/lib/Analysis/ProfileSummaryInfo.cpp
    llvm/trunk/lib/IR/IRPrintingPasses.cpp
    llvm/trunk/lib/Passes/PassBuilder.cpp
    llvm/trunk/lib/Transforms/IPO/CrossDSOCFI.cpp
    llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp
    llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp
    llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp
    llvm/trunk/lib/Transforms/IPO/InferFunctionAttrs.cpp
    llvm/trunk/lib/Transforms/IPO/Internalize.cpp
    llvm/trunk/lib/Transforms/IPO/LowerTypeTests.cpp
    llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp
    llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp
    llvm/trunk/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
    llvm/trunk/lib/Transforms/Instrumentation/InstrProfiling.cpp
    llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
    llvm/trunk/lib/Transforms/Scalar/SCCP.cpp

Modified: llvm/trunk/include/llvm/Analysis/CallGraph.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/CallGraph.h?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/CallGraph.h (original)
+++ llvm/trunk/include/llvm/Analysis/CallGraph.h Mon Aug  8 19:28:38 2016
@@ -315,7 +315,7 @@ class CallGraphPrinterPass : public Pass
 
 public:
   explicit CallGraphPrinterPass(raw_ostream &OS) : OS(OS) {}
-  PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM);
+  PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
 };
 
 /// \brief The \c ModulePass which wraps up a \c CallGraph and the logic to

Modified: llvm/trunk/include/llvm/Analysis/GlobalsModRef.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/GlobalsModRef.h?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/GlobalsModRef.h (original)
+++ llvm/trunk/include/llvm/Analysis/GlobalsModRef.h Mon Aug  8 19:28:38 2016
@@ -125,7 +125,7 @@ class GlobalsAA : public AnalysisInfoMix
 public:
   typedef GlobalsAAResult Result;
 
-  GlobalsAAResult run(Module &M, AnalysisManager<Module> &AM);
+  GlobalsAAResult run(Module &M, ModuleAnalysisManager &AM);
 };
 
 /// Legacy wrapper pass to provide the GlobalsAAResult object.

Modified: llvm/trunk/include/llvm/Analysis/ProfileSummaryInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ProfileSummaryInfo.h?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ProfileSummaryInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/ProfileSummaryInfo.h Mon Aug  8 19:28:38 2016
@@ -105,7 +105,7 @@ class ProfileSummaryPrinterPass
 
 public:
   explicit ProfileSummaryPrinterPass(raw_ostream &OS) : OS(OS) {}
-  PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM);
+  PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
 };
 
 } // end namespace llvm

Modified: llvm/trunk/include/llvm/Transforms/GCOVProfiler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/GCOVProfiler.h?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/GCOVProfiler.h (original)
+++ llvm/trunk/include/llvm/Transforms/GCOVProfiler.h Mon Aug  8 19:28:38 2016
@@ -21,7 +21,7 @@ namespace llvm {
 class GCOVProfilerPass : public PassInfoMixin<GCOVProfilerPass> {
 public:
   GCOVProfilerPass(const GCOVOptions &Options = GCOVOptions::getDefault()) : GCOVOpts(Options) { }
-  PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM);
+  PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
 
 private:
   GCOVOptions GCOVOpts;

Modified: llvm/trunk/include/llvm/Transforms/IPO/CrossDSOCFI.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/IPO/CrossDSOCFI.h?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/IPO/CrossDSOCFI.h (original)
+++ llvm/trunk/include/llvm/Transforms/IPO/CrossDSOCFI.h Mon Aug  8 19:28:38 2016
@@ -21,7 +21,7 @@
 namespace llvm {
 class CrossDSOCFIPass : public PassInfoMixin<CrossDSOCFIPass> {
 public:
-  PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM);
+  PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
 };
 }
 #endif // LLVM_TRANSFORMS_IPO_CROSSDSOCFI_H

Modified: llvm/trunk/include/llvm/Transforms/IPO/FunctionAttrs.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/IPO/FunctionAttrs.h?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/IPO/FunctionAttrs.h (original)
+++ llvm/trunk/include/llvm/Transforms/IPO/FunctionAttrs.h Mon Aug  8 19:28:38 2016
@@ -50,7 +50,7 @@ Pass *createPostOrderFunctionAttrsLegacy
 class ReversePostOrderFunctionAttrsPass
     : public PassInfoMixin<ReversePostOrderFunctionAttrsPass> {
 public:
-  PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM);
+  PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
 };
 }
 

Modified: llvm/trunk/include/llvm/Transforms/IPO/FunctionImport.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/IPO/FunctionImport.h?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/IPO/FunctionImport.h (original)
+++ llvm/trunk/include/llvm/Transforms/IPO/FunctionImport.h Mon Aug  8 19:28:38 2016
@@ -69,7 +69,7 @@ class FunctionImportPass : public PassIn
 public:
   FunctionImportPass(const ModuleSummaryIndex *Index = nullptr)
       : Index(Index) {}
-  PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM);
+  PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
 
 private:
   const ModuleSummaryIndex *Index;

Modified: llvm/trunk/include/llvm/Transforms/IPO/GlobalOpt.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/IPO/GlobalOpt.h?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/IPO/GlobalOpt.h (original)
+++ llvm/trunk/include/llvm/Transforms/IPO/GlobalOpt.h Mon Aug  8 19:28:38 2016
@@ -24,7 +24,7 @@ namespace llvm {
 /// Optimize globals that never have their address taken.
 class GlobalOptPass : public PassInfoMixin<GlobalOptPass> {
 public:
-  PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM);
+  PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
 };
 
 }

Modified: llvm/trunk/include/llvm/Transforms/IPO/InferFunctionAttrs.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/IPO/InferFunctionAttrs.h?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/IPO/InferFunctionAttrs.h (original)
+++ llvm/trunk/include/llvm/Transforms/IPO/InferFunctionAttrs.h Mon Aug  8 19:28:38 2016
@@ -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<InferFunctionAttrsPass> {
-  PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM);
+  PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
 };
 
 /// Create a legacy pass manager instance of a pass to infer function

Modified: llvm/trunk/include/llvm/Transforms/IPO/Internalize.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/IPO/Internalize.h?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/IPO/Internalize.h (original)
+++ llvm/trunk/include/llvm/Transforms/IPO/Internalize.h Mon Aug  8 19:28:38 2016
@@ -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<Module> &AM);
+  PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
 };
 
 /// Helper function to internalize functions and variables in a Module.

Modified: llvm/trunk/include/llvm/Transforms/IPO/LowerTypeTests.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/IPO/LowerTypeTests.h?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/IPO/LowerTypeTests.h (original)
+++ llvm/trunk/include/llvm/Transforms/IPO/LowerTypeTests.h Mon Aug  8 19:28:38 2016
@@ -205,7 +205,7 @@ struct ByteArrayBuilder {
 
 class LowerTypeTestsPass : public PassInfoMixin<LowerTypeTestsPass> {
 public:
-  PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM);
+  PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
 };
 
 } // end namespace llvm

Modified: llvm/trunk/include/llvm/Transforms/IPO/SCCP.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/IPO/SCCP.h?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/IPO/SCCP.h (original)
+++ llvm/trunk/include/llvm/Transforms/IPO/SCCP.h Mon Aug  8 19:28:38 2016
@@ -28,7 +28,7 @@ namespace llvm {
 /// Pass to perform interprocedural constant propagation.
 class IPSCCPPass : public PassInfoMixin<IPSCCPPass> {
 public:
-  PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM);
+  PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
 };
 }
 #endif // LLVM_TRANSFORMS_IPO_SCCP_H

Modified: llvm/trunk/include/llvm/Transforms/InstrProfiling.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/InstrProfiling.h?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/InstrProfiling.h (original)
+++ llvm/trunk/include/llvm/Transforms/InstrProfiling.h Mon Aug  8 19:28:38 2016
@@ -29,7 +29,7 @@ public:
   InstrProfiling() {}
   InstrProfiling(const InstrProfOptions &Options) : Options(Options) {}
 
-  PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM);
+  PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
   bool run(Module &M);
 
 private:

Modified: llvm/trunk/include/llvm/Transforms/PGOInstrumentation.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/PGOInstrumentation.h?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/PGOInstrumentation.h (original)
+++ llvm/trunk/include/llvm/Transforms/PGOInstrumentation.h Mon Aug  8 19:28:38 2016
@@ -22,13 +22,13 @@ namespace llvm {
 /// The instrumentation (profile-instr-gen) pass for IR based PGO.
 class PGOInstrumentationGen : public PassInfoMixin<PGOInstrumentationGen> {
 public:
-  PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM);
+  PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
 };
 
 /// The profile annotation (profile-instr-use) pass for IR based PGO.
 class PGOInstrumentationUse : public PassInfoMixin<PGOInstrumentationUse> {
 public:
-  PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM);
+  PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
   PGOInstrumentationUse(std::string Filename = "");
 
 private:
@@ -39,7 +39,7 @@ private:
 class PGOIndirectCallPromotion : public PassInfoMixin<PGOIndirectCallPromotion> {
 public:
   PGOIndirectCallPromotion(bool IsInLTO = false) : InLTO(IsInLTO) {}
-  PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM);
+  PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
 private:
   bool InLTO;
 };

Modified: llvm/trunk/include/llvm/Transforms/SampleProfile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/SampleProfile.h?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/SampleProfile.h (original)
+++ llvm/trunk/include/llvm/Transforms/SampleProfile.h Mon Aug  8 19:28:38 2016
@@ -20,7 +20,7 @@ namespace llvm {
 /// The sample profiler data loader pass.
 class SampleProfileLoaderPass : public PassInfoMixin<SampleProfileLoaderPass> {
 public:
-  PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM);
+  PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
 };
 
 } // End llvm namespace

Modified: llvm/trunk/lib/Analysis/CallGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/CallGraph.cpp?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/CallGraph.cpp (original)
+++ llvm/trunk/lib/Analysis/CallGraph.cpp Mon Aug  8 19:28:38 2016
@@ -261,7 +261,7 @@ void CallGraphNode::replaceCallEdge(Call
 char CallGraphAnalysis::PassID;
 
 PreservedAnalyses CallGraphPrinterPass::run(Module &M,
-                                            AnalysisManager<Module> &AM) {
+                                            ModuleAnalysisManager &AM) {
   AM.getResult<CallGraphAnalysis>(M).print(OS);
   return PreservedAnalyses::all();
 }

Modified: llvm/trunk/lib/Analysis/GlobalsModRef.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/GlobalsModRef.cpp?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/GlobalsModRef.cpp (original)
+++ llvm/trunk/lib/Analysis/GlobalsModRef.cpp Mon Aug  8 19:28:38 2016
@@ -939,7 +939,7 @@ GlobalsAAResult::analyzeModule(Module &M
 
 char GlobalsAA::PassID;
 
-GlobalsAAResult GlobalsAA::run(Module &M, AnalysisManager<Module> &AM) {
+GlobalsAAResult GlobalsAA::run(Module &M, ModuleAnalysisManager &AM) {
   return GlobalsAAResult::analyzeModule(M,
                                         AM.getResult<TargetLibraryAnalysis>(M),
                                         AM.getResult<CallGraphAnalysis>(M));

Modified: llvm/trunk/lib/Analysis/ProfileSummaryInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileSummaryInfo.cpp?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ProfileSummaryInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/ProfileSummaryInfo.cpp Mon Aug  8 19:28:38 2016
@@ -148,7 +148,7 @@ ProfileSummaryInfo ProfileSummaryAnalysi
 // FIXME: This only tests isHotFunction and isColdFunction and not the
 // isHotCount and isColdCount calls.
 PreservedAnalyses ProfileSummaryPrinterPass::run(Module &M,
-                                                 AnalysisManager<Module> &AM) {
+                                                 ModuleAnalysisManager &AM) {
   ProfileSummaryInfo &PSI = AM.getResult<ProfileSummaryAnalysis>(M);
 
   OS << "Functions in " << M.getName() << " with hot/cold annotations: \n";

Modified: llvm/trunk/lib/IR/IRPrintingPasses.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/IRPrintingPasses.cpp?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/lib/IR/IRPrintingPasses.cpp (original)
+++ llvm/trunk/lib/IR/IRPrintingPasses.cpp Mon Aug  8 19:28:38 2016
@@ -26,7 +26,7 @@ PrintModulePass::PrintModulePass(raw_ost
     : OS(OS), Banner(Banner),
       ShouldPreserveUseListOrder(ShouldPreserveUseListOrder) {}
 
-PreservedAnalyses PrintModulePass::run(Module &M, AnalysisManager<Module> &) {
+PreservedAnalyses PrintModulePass::run(Module &M, ModuleAnalysisManager &) {
   OS << Banner;
   if (llvm::isFunctionInPrintList("*"))
     M.print(OS, nullptr, ShouldPreserveUseListOrder);

Modified: llvm/trunk/lib/Passes/PassBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Passes/PassBuilder.cpp?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/lib/Passes/PassBuilder.cpp (original)
+++ llvm/trunk/lib/Passes/PassBuilder.cpp Mon Aug  8 19:28:38 2016
@@ -135,7 +135,7 @@ namespace {
 
 /// \brief No-op module pass which does nothing.
 struct NoOpModulePass {
-  PreservedAnalyses run(Module &M, AnalysisManager<Module> &) {
+  PreservedAnalyses run(Module &M, ModuleAnalysisManager &) {
     return PreservedAnalyses::all();
   }
   static StringRef name() { return "NoOpModulePass"; }
@@ -148,7 +148,7 @@ class NoOpModuleAnalysis : public Analys
 
 public:
   struct Result {};
-  Result run(Module &, AnalysisManager<Module> &) { return Result(); }
+  Result run(Module &, ModuleAnalysisManager &) { return Result(); }
   static StringRef name() { return "NoOpModuleAnalysis"; }
 };
 

Modified: llvm/trunk/lib/Transforms/IPO/CrossDSOCFI.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/CrossDSOCFI.cpp?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/CrossDSOCFI.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/CrossDSOCFI.cpp Mon Aug  8 19:28:38 2016
@@ -155,7 +155,7 @@ bool CrossDSOCFI::runOnModule(Module &M)
   return true;
 }
 
-PreservedAnalyses CrossDSOCFIPass::run(Module &M, AnalysisManager<Module> &AM) {
+PreservedAnalyses CrossDSOCFIPass::run(Module &M, ModuleAnalysisManager &AM) {
   CrossDSOCFI Impl;
   bool Changed = Impl.runOnModule(M);
   if (!Changed)

Modified: llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp Mon Aug  8 19:28:38 2016
@@ -1267,7 +1267,7 @@ bool ReversePostOrderFunctionAttrsLegacy
 }
 
 PreservedAnalyses
-ReversePostOrderFunctionAttrsPass::run(Module &M, AnalysisManager<Module> &AM) {
+ReversePostOrderFunctionAttrsPass::run(Module &M, ModuleAnalysisManager &AM) {
   auto &CG = AM.getResult<CallGraphAnalysis>(M);
 
   bool Changed = deduceFunctionAttributeInRPO(M, CG);

Modified: llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp Mon Aug  8 19:28:38 2016
@@ -785,7 +785,7 @@ public:
 } // anonymous namespace
 
 PreservedAnalyses FunctionImportPass::run(Module &M,
-                                          AnalysisManager<Module> &AM) {
+                                          ModuleAnalysisManager &AM) {
   if (!doImportingForModule(M, Index))
     return PreservedAnalyses::all();
 

Modified: llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp Mon Aug  8 19:28:38 2016
@@ -2565,7 +2565,7 @@ static bool optimizeGlobalsInModule(
   return Changed;
 }
 
-PreservedAnalyses GlobalOptPass::run(Module &M, AnalysisManager<Module> &AM) {
+PreservedAnalyses GlobalOptPass::run(Module &M, ModuleAnalysisManager &AM) {
     auto &DL = M.getDataLayout();
     auto &TLI = AM.getResult<TargetLibraryAnalysis>(M);
     auto &FAM =

Modified: llvm/trunk/lib/Transforms/IPO/InferFunctionAttrs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/InferFunctionAttrs.cpp?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/InferFunctionAttrs.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/InferFunctionAttrs.cpp Mon Aug  8 19:28:38 2016
@@ -34,7 +34,7 @@ static bool inferAllPrototypeAttributes(
 }
 
 PreservedAnalyses InferFunctionAttrsPass::run(Module &M,
-                                              AnalysisManager<Module> &AM) {
+                                              ModuleAnalysisManager &AM) {
   auto &TLI = AM.getResult<TargetLibraryAnalysis>(M);
 
   if (!inferAllPrototypeAttributes(M, TLI))

Modified: llvm/trunk/lib/Transforms/IPO/Internalize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/Internalize.cpp?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/Internalize.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/Internalize.cpp Mon Aug  8 19:28:38 2016
@@ -239,7 +239,7 @@ bool InternalizePass::internalizeModule(
 
 InternalizePass::InternalizePass() : MustPreserveGV(PreserveAPIList()) {}
 
-PreservedAnalyses InternalizePass::run(Module &M, AnalysisManager<Module> &AM) {
+PreservedAnalyses InternalizePass::run(Module &M, ModuleAnalysisManager &AM) {
   if (!internalizeModule(M, AM.getCachedResult<CallGraphAnalysis>(M)))
     return PreservedAnalyses::all();
 

Modified: llvm/trunk/lib/Transforms/IPO/LowerTypeTests.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/LowerTypeTests.cpp?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/LowerTypeTests.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/LowerTypeTests.cpp Mon Aug  8 19:28:38 2016
@@ -1061,7 +1061,7 @@ bool LowerTypeTests::runOnModule(Module
 }
 
 PreservedAnalyses LowerTypeTestsPass::run(Module &M,
-                                          AnalysisManager<Module> &AM) {
+                                          ModuleAnalysisManager &AM) {
   LowerTypeTests Impl;
   init(&Impl, M);
   bool Changed = Impl.lower();

Modified: llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp Mon Aug  8 19:28:38 2016
@@ -1253,7 +1253,7 @@ bool SampleProfileLoader::runOnFunction(
 }
 
 PreservedAnalyses SampleProfileLoaderPass::run(Module &M,
-                                               AnalysisManager<Module> &AM) {
+                                               ModuleAnalysisManager &AM) {
 
   SampleProfileLoader SampleLoader(SampleProfileFile);
 

Modified: llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp Mon Aug  8 19:28:38 2016
@@ -453,7 +453,7 @@ bool GCOVProfiler::runOnModule(Module &M
 }
 
 PreservedAnalyses GCOVProfilerPass::run(Module &M,
-                                        AnalysisManager<Module> &AM) {
+                                        ModuleAnalysisManager &AM) {
 
   GCOVProfiler Profiler(GCOVOpts);
 

Modified: llvm/trunk/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp Mon Aug  8 19:28:38 2016
@@ -653,7 +653,7 @@ bool PGOIndirectCallPromotionLegacyPass:
   return promoteIndirectCalls(M, InLTO | ICPLTOMode);
 }
 
-PreservedAnalyses PGOIndirectCallPromotion::run(Module &M, AnalysisManager<Module> &AM) {
+PreservedAnalyses PGOIndirectCallPromotion::run(Module &M, ModuleAnalysisManager &AM) {
   if (!promoteIndirectCalls(M, InLTO | ICPLTOMode))
     return PreservedAnalyses::all();
 

Modified: llvm/trunk/lib/Transforms/Instrumentation/InstrProfiling.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/InstrProfiling.cpp?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/InstrProfiling.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/InstrProfiling.cpp Mon Aug  8 19:28:38 2016
@@ -66,7 +66,7 @@ public:
 
 } // anonymous namespace
 
-PreservedAnalyses InstrProfiling::run(Module &M, AnalysisManager<Module> &AM) {
+PreservedAnalyses InstrProfiling::run(Module &M, ModuleAnalysisManager &AM) {
   if (!run(M))
     return PreservedAnalyses::all();
 

Modified: llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp Mon Aug  8 19:28:38 2016
@@ -964,7 +964,7 @@ bool PGOInstrumentationGenLegacyPass::ru
 }
 
 PreservedAnalyses PGOInstrumentationGen::run(Module &M,
-                                             AnalysisManager<Module> &AM) {
+                                             ModuleAnalysisManager &AM) {
 
   auto &FAM = AM.getResult<FunctionAnalysisManagerModuleProxy>(M).getManager();
   auto LookupBPI = [&FAM](Function &F) {
@@ -1056,7 +1056,7 @@ PGOInstrumentationUse::PGOInstrumentatio
 }
 
 PreservedAnalyses PGOInstrumentationUse::run(Module &M,
-                                             AnalysisManager<Module> &AM) {
+                                             ModuleAnalysisManager &AM) {
 
   auto &FAM = AM.getResult<FunctionAnalysisManagerModuleProxy>(M).getManager();
   auto LookupBPI = [&FAM](Function &F) {

Modified: llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SCCP.cpp?rev=278078&r1=278077&r2=278078&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SCCP.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SCCP.cpp Mon Aug  8 19:28:38 2016
@@ -1941,7 +1941,7 @@ static bool runIPSCCP(Module &M, const D
   return MadeChanges;
 }
 
-PreservedAnalyses IPSCCPPass::run(Module &M, AnalysisManager<Module> &AM) {
+PreservedAnalyses IPSCCPPass::run(Module &M, ModuleAnalysisManager &AM) {
   const DataLayout &DL = M.getDataLayout();
   auto &TLI = AM.getResult<TargetLibraryAnalysis>(M);
   if (!runIPSCCP(M, DL, &TLI))




More information about the llvm-commits mailing list