[PATCH] D24934: [LICM] Add support of a new optimization case to Loop Versioning for LICM + code clean up

Evgeny Astigeevich via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 27 07:26:09 PDT 2016


eastig added a comment.

In https://reviews.llvm.org/D24934#553702, @ashutosh.nema wrote:

> Thanks Evgeny for working on this.
>
> Currently when pointers bounds are unknown we don’t consider them
>  for alias check and we avoid versioning, but this change introduces partial
>  alias check, it may be risky for applications, wondering what’s the purpose partial
>  alias check.


The purpose of the partial alias checking is to split responsibility between LoopAccessAnalysis and its user. LoopAccessAnalysis is a very powerful tool but it tries to cover all pointers in a loop which is not always possible. IMHO it's up to the user of LoopAccessAnalysis what to do with unrecognized pointers.
E.g. if there are three pointers:

LoopInvariantPointer
PointerA
PointerB

then LICM can move operations on LoopInvariantPointer out of a loop if it's proven that LoopInvariantPointer is not aliased with PointerA and PointerB. We don't need to check aliasing of PointerA and PointerB. At the moment if any of pointers are not recognized no checks are created. Why not to allow to reuse results of analysis? Actually I would like to have more control  on which RT checks need to be finally created.


https://reviews.llvm.org/D24934





More information about the llvm-commits mailing list