[PATCH] D79080: [BPI][NFC] IRCE shoud qequest BPI through analysis manager.

Evgeniy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 29 04:47:23 PDT 2020


ebrevnov created this revision.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
ebrevnov added a reviewer: skatkov.

There is no need to create BPI explicitly. It should be requested through AM in a normal way.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79080

Files:
  llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp


Index: llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
+++ llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
@@ -1768,12 +1768,9 @@
 PreservedAnalyses IRCEPass::run(Function &F, FunctionAnalysisManager &AM) {
   auto &SE = AM.getResult<ScalarEvolutionAnalysis>(F);
   auto &DT = AM.getResult<DominatorTreeAnalysis>(F);
-  auto *PDT = AM.getCachedResult<PostDominatorTreeAnalysis>(F);
+  auto &BPI = AM.getResult<BranchProbabilityAnalysis>(F);
   LoopInfo &LI = AM.getResult<LoopAnalysis>(F);
-  TargetLibraryInfo &TLI = AM.getResult<TargetLibraryAnalysis>(F);
 
-  // TODO: Request BPI through AM directly?
-  BranchProbabilityInfo BPI(F, LI, &TLI, PDT);
   InductiveRangeCheckElimination IRCE(SE, &BPI, DT, LI);
 
   bool Changed = false;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79080.260884.patch
Type: text/x-patch
Size: 900 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200429/59c592fb/attachment.bin>


More information about the llvm-commits mailing list