[llvm] [IRCE] Relax profitability check (PR #104659)

Jan Ječmen via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 19 05:26:46 PDT 2024


JanJecmen wrote:

@aleks-tmb Hi, thanks for the review. I addressed your comments and pushed a new version. I tweaked the new test to better show the effect: IRCE previously wouldn't fire because the range check branch weights are 1:1, but now it eliminates 50 of the 100 checks. Setting the threshold to 51 then prevents it from applying. I also refactored some small details (used BranchProbability existing API for inversion, hoisted a loop invariant computation of the loop trip count estimate).

https://github.com/llvm/llvm-project/pull/104659


More information about the llvm-commits mailing list