[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
This commit is contained in:
@@ -1608,12 +1608,12 @@ bool BasicAAResult::constantOffsetHeuristic(
|
||||
|
||||
char BasicAA::PassID;
|
||||
|
||||
BasicAAResult BasicAA::run(Function &F, AnalysisManager<Function> *AM) {
|
||||
BasicAAResult BasicAA::run(Function &F, AnalysisManager<Function> &AM) {
|
||||
return BasicAAResult(F.getParent()->getDataLayout(),
|
||||
AM->getResult<TargetLibraryAnalysis>(F),
|
||||
AM->getResult<AssumptionAnalysis>(F),
|
||||
AM->getCachedResult<DominatorTreeAnalysis>(F),
|
||||
AM->getCachedResult<LoopAnalysis>(F));
|
||||
AM.getResult<TargetLibraryAnalysis>(F),
|
||||
AM.getResult<AssumptionAnalysis>(F),
|
||||
AM.getCachedResult<DominatorTreeAnalysis>(F),
|
||||
AM.getCachedResult<LoopAnalysis>(F));
|
||||
}
|
||||
|
||||
BasicAAWrapperPass::BasicAAWrapperPass() : FunctionPass(ID) {
|
||||
|
||||
Reference in New Issue
Block a user