[PATCH] D78987: [BPI][NFC] Reuse post dominantor tree from analysis manager when available
Serguei Katkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 29 02:06:32 PDT 2020
skatkov added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp:1774
BranchProbabilityInfo BPI;
- BPI.calculate(F, LI);
+ BPI.calculate(F, LI, &TLI, nullptr);
InductiveRangeCheckElimination IRCE(SE, &BPI, DT, LI);
----------------
ebrevnov wrote:
> skatkov wrote:
> > why nullptr instead of request Pass manager for analysis if it is created anyway?
> Even though current implementation of BPI.calculate uses post dominator tree unconditionally we can potentially switch to conditional use. In particular in presence of profile information on branches we give it a priority and don't actually need post dominator tree to compute probabilities. Yes, currently there is one exception from this rule but this is discussable.
I'm a bit confused.
In a previous comment you say that you do not introduce nullptr by default because it might give a chance for user to use less precise result.
Why we should not provide additional information here to get the more precise result?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78987/new/
https://reviews.llvm.org/D78987
More information about the llvm-commits
mailing list