[all-commits] [llvm/llvm-project] 400f6e: [IRCE] Use the same min runtime iteration threshol...

serguei-katkov via All-commits all-commits at lists.llvm.org
Sun Nov 15 18:54:27 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 400f6edce7541e071afe18e40cca745a672e84dc
      https://github.com/llvm/llvm-project/commit/400f6edce7541e071afe18e40cca745a672e84dc
  Author: Serguei Katkov <serguei.katkov at azul.com>
  Date:   2020-11-16 (Mon, 16 Nov 2020)

  Changed paths:
    M llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
    M llvm/test/Transforms/IRCE/low-iterations.ll
    M llvm/test/Transforms/IRCE/multiple-access-no-preloop.ll

  Log Message:
  -----------
  [IRCE] Use the same min runtime iteration threshold for BPI and BFI checks

In the last change to IRCE the BPI is ignored if BFI is present, however
BFI and BPI have a different thresholds. Specifically BPI approach checks only
latch exit probability so it is expected if the loop has only one exit block (latch)
the behavior with BFI and BPI should be the same,

BPI approach by default uses threshold 10, so it considers the loop with estimated
number of iterations less then 10 should not be considered for IRCE optimization.
BFI approach uses the default value 3 and this is inconsistent.

The CL modifies the code to use the same threshold for both approaches..

The test is updated due to it has two side-exits (except latch) and each of them has a
probability 1/16, so BFI estimates the number of runtime iteration is about to 7
(1/16 + 1/16 + some for latch) and test fails.

Reviewers: mkazantsev, ebrevnov
Reviewed By: mkazantsev
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D91230




More information about the All-commits mailing list