[PATCH] D44667: [LoopPredication] Add profitability check based on BPI
Serguei Katkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 22 04:27:03 PDT 2018
skatkov added inline comments.
================
Comment at: lib/Transforms/Scalar/LoopPredication.cpp:748
+ for (const auto &ExitEdge : ExitEdges) {
+ BranchProbability ExitingBlockProbability =
+ BPI->getEdgeProbability(ExitEdge.first, ExitEdge.second);
----------------
anna wrote:
> skatkov wrote:
> > You still need to skip latch exiting basic block.
> you don't need to skip it. The check at line 750 will never be true for latch exit basic block (exitingblock probability > latchExitingBlockProbability). I intentionally ignored checking for latch exiting basic block, it saves us a check for every exiting edge...
That is true until someone will not set LatchExitProbabilityScale to 0.5.
Repository:
rL LLVM
https://reviews.llvm.org/D44667
More information about the llvm-commits
mailing list