[PATCH] D135387: [LoopPeel] Allow to bypass profitability checks. NFC

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 6 13:21:49 PDT 2022


nikic added a comment.

I don't think there is a single "profitability" API for loop peeling. Loop peeling currently performs three different types of peeling: To render conditions invariant, to make loads dereferenceable and to peel based on PGO loop count. These have different profitability criterions. The current (in-tree) implementation already separately checks profitability for these cases (with the first case being essentially always profitable, and the other two using the deopt/unreachable exit check, plus additional profitability checks). I believe the check in canPeel() itself is only relevant for the branch weight issues at this point, profitability is handled separately on a case-by-case basis. If you have out-of-tree uses of loop peeling, you likely want to do the same there.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135387/new/

https://reviews.llvm.org/D135387



More information about the llvm-commits mailing list