From b47f8010a95f461f995e30dc2b77391093183605 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Fri, 11 Mar 2016 11:05:24 +0000 Subject: [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 --- llvm/lib/Transforms/InstCombine/InstructionCombining.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'llvm/lib/Transforms/InstCombine/InstructionCombining.cpp') diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp index d728f1a..c6406e4 100644 --- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -3082,12 +3082,12 @@ combineInstructionsOverFunction(Function &F, InstCombineWorklist &Worklist, } PreservedAnalyses InstCombinePass::run(Function &F, - AnalysisManager *AM) { - auto &AC = AM->getResult(F); - auto &DT = AM->getResult(F); - auto &TLI = AM->getResult(F); + AnalysisManager &AM) { + auto &AC = AM.getResult(F); + auto &DT = AM.getResult(F); + auto &TLI = AM.getResult(F); - auto *LI = AM->getCachedResult(F); + auto *LI = AM.getCachedResult(F); // FIXME: The AliasAnalysis is not yet supported in the new pass manager if (!combineInstructionsOverFunction(F, Worklist, nullptr, AC, TLI, DT, -- cgit v1.1