summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/IVUsers.cpp
diff options
context:
space:
mode:
authorSean Silva <chisophugis@gmail.com>2016-08-09 00:28:52 +0000
committerSean Silva <chisophugis@gmail.com>2016-08-09 00:28:52 +0000
commit0746f3bfa4da3daec4a5817570f8a255bc1c2a30 (patch)
treed79383384f9e88ab8736fa9e1cf8db925e20c52e /llvm/lib/Analysis/IVUsers.cpp
parentfd03ac6a0c7e2092ae9c0a05f229a1a2dd4608ae (diff)
downloadbcm5719-llvm-0746f3bfa4da3daec4a5817570f8a255bc1c2a30.tar.gz
bcm5719-llvm-0746f3bfa4da3daec4a5817570f8a255bc1c2a30.zip
Consistently use LoopAnalysisManager
One exception here is LoopInfo which must forward-declare it (because the typedef is in LoopPassManager.h which depends on LoopInfo). Also, some includes for LoopPassManager.h were needed since that file provides the typedef. 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: 278079
Diffstat (limited to 'llvm/lib/Analysis/IVUsers.cpp')
-rw-r--r--llvm/lib/Analysis/IVUsers.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/IVUsers.cpp b/llvm/lib/Analysis/IVUsers.cpp
index 43c0ba17fe4..11056fbd64f 100644
--- a/llvm/lib/Analysis/IVUsers.cpp
+++ b/llvm/lib/Analysis/IVUsers.cpp
@@ -36,7 +36,7 @@ using namespace llvm;
char IVUsersAnalysis::PassID;
-IVUsers IVUsersAnalysis::run(Loop &L, AnalysisManager<Loop> &AM) {
+IVUsers IVUsersAnalysis::run(Loop &L, LoopAnalysisManager &AM) {
const auto &FAM =
AM.getResult<FunctionAnalysisManagerLoopProxy>(L).getManager();
Function *F = L.getHeader()->getParent();
@@ -47,7 +47,7 @@ IVUsers IVUsersAnalysis::run(Loop &L, AnalysisManager<Loop> &AM) {
FAM.getCachedResult<ScalarEvolutionAnalysis>(*F));
}
-PreservedAnalyses IVUsersPrinterPass::run(Loop &L, AnalysisManager<Loop> &AM) {
+PreservedAnalyses IVUsersPrinterPass::run(Loop &L, LoopAnalysisManager &AM) {
AM.getResult<IVUsersAnalysis>(L).print(OS);
return PreservedAnalyses::all();
}
OpenPOWER on IntegriCloud