diff options
author | Sean Silva <chisophugis@gmail.com> | 2016-08-09 00:28:38 +0000 |
---|---|---|
committer | Sean Silva <chisophugis@gmail.com> | 2016-08-09 00:28:38 +0000 |
commit | fd03ac6a0c7e2092ae9c0a05f229a1a2dd4608ae (patch) | |
tree | 04a054e45872e5025f52ff4074e14ddcbbedba5c /llvm/lib/Analysis | |
parent | 36e0d01e13b32bf318139fd8c43849af7a0e13cc (diff) | |
download | bcm5719-llvm-fd03ac6a0c7e2092ae9c0a05f229a1a2dd4608ae.tar.gz bcm5719-llvm-fd03ac6a0c7e2092ae9c0a05f229a1a2dd4608ae.zip |
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
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/CallGraph.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Analysis/GlobalsModRef.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Analysis/ProfileSummaryInfo.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/CallGraph.cpp b/llvm/lib/Analysis/CallGraph.cpp index 39cb86d2ccb..adf378b6454 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<Module> &AM) { + ModuleAnalysisManager &AM) { AM.getResult<CallGraphAnalysis>(M).print(OS); return PreservedAnalyses::all(); } diff --git a/llvm/lib/Analysis/GlobalsModRef.cpp b/llvm/lib/Analysis/GlobalsModRef.cpp index a7d1e048e13..a7cf134960e 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<Module> &AM) { +GlobalsAAResult GlobalsAA::run(Module &M, ModuleAnalysisManager &AM) { return GlobalsAAResult::analyzeModule(M, AM.getResult<TargetLibraryAnalysis>(M), AM.getResult<CallGraphAnalysis>(M)); diff --git a/llvm/lib/Analysis/ProfileSummaryInfo.cpp b/llvm/lib/Analysis/ProfileSummaryInfo.cpp index 9cf99af4958..300b26552d3 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<Module> &AM) { + ModuleAnalysisManager &AM) { ProfileSummaryInfo &PSI = AM.getResult<ProfileSummaryAnalysis>(M); OS << "Functions in " << M.getName() << " with hot/cold annotations: \n"; |