[PATCH] D44667: [LoopPredication] Add profitability check based on BPI

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 21 00:25:54 PDT 2018


skatkov added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopPredication.cpp:746
+    // predicate.
+    if (ExitingBlockProbability > LatchExitProbability * ProbabilityThreshold)
+      return false;
----------------
skatkov wrote:
> It is not a big deal and compiler should do it instead of you but you can hoist LatchExitProbability * ProbabilityThreshold to pre-header :)
Also please consider renaming of the option ProbabilityThreshold. To me threshold is actually "LatchExitProbability * ProbabilityThreshold". However I might be wrong.


Repository:
  rL LLVM

https://reviews.llvm.org/D44667





More information about the llvm-commits mailing list