[PATCH] D92066: [LAA] Relax restrictions on early exits in loop structure

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 13 07:33:05 PST 2020


fhahn accepted this revision.
fhahn added a comment.

LGTM, thanks! It looks like there are some formatting issues, please re-format before landing.

In D92066#2450541 <https://reviews.llvm.org/D92066#2450541>, @Ayal wrote:

>> I can't actually find anything in LAA itself which relies on having all instructions within a loop execute an equal number of times.
>
> Well, LAA's `RuntimePointerChecking::insert()` relies on `getBackedgeTakenCount()` to provide "the" trip-count, which may vary for distinct instructions if the loop is not bottom-tested. But it does provide an upper-bound for all instructions, i.e., a safe, conservative value. In other words, a slightly tighter runtime check could potentially be provided for pointers accessed one less iteration, appearing 'below' the exiting block.

That matches my understanding as well. The current approach should be conservatively correct, with potential for making LAA smarter when it comes to reasoning about dependences only along certain exit paths in the future.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92066



More information about the llvm-commits mailing list