diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2016-03-11 11:05:24 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2016-03-11 11:05:24 +0000 |
commit | b47f8010a95f461f995e30dc2b77391093183605 (patch) | |
tree | 49902b63ea6fa976481a52ca24f1797e3f60ed67 /llvm/lib/Analysis/MemoryDependenceAnalysis.cpp | |
parent | f4cc1fc7e9d7df18176fc139b30f78c24ac0cc31 (diff) | |
download | llvm-b47f8010a95f461f995e30dc2b77391093183605.zip llvm-b47f8010a95f461f995e30dc2b77391093183605.tar.gz llvm-b47f8010a95f461f995e30dc2b77391093183605.tar.bz2 |
[PM] Make the AnalysisManager parameter to run methods a reference.
This was originally a pointer to support pass managers which didn't use
AnalysisManagers. However, that doesn't realistically come up much and
the complexity of supporting it doesn't really make sense.
In fact, *many* parts of the pass manager were just assuming the pointer
was never null already. This at least makes it much more explicit and
clear.
llvm-svn: 263219
Diffstat (limited to 'llvm/lib/Analysis/MemoryDependenceAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/MemoryDependenceAnalysis.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp index 9606c84..c99d206 100644 --- a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp +++ b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp @@ -1662,11 +1662,11 @@ void MemoryDependenceResults::verifyRemoved(Instruction *D) const { char MemoryDependenceAnalysis::PassID; MemoryDependenceResults -MemoryDependenceAnalysis::run(Function &F, AnalysisManager<Function> *AM) { - auto &AA = AM->getResult<AAManager>(F); - auto &AC = AM->getResult<AssumptionAnalysis>(F); - auto &TLI = AM->getResult<TargetLibraryAnalysis>(F); - auto *DT = AM->getCachedResult<DominatorTreeAnalysis>(F); +MemoryDependenceAnalysis::run(Function &F, AnalysisManager<Function> &AM) { + auto &AA = AM.getResult<AAManager>(F); + auto &AC = AM.getResult<AssumptionAnalysis>(F); + auto &TLI = AM.getResult<TargetLibraryAnalysis>(F); + auto *DT = AM.getCachedResult<DominatorTreeAnalysis>(F); return MemoryDependenceResults(AA, AC, TLI, DT); } |