[PATCH] D94306: [LoopRotate] Use llvm.experimental.noalias.scope.decl for duplicating noalias metadata as needed

Jeroen Dobbelaere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 22 00:58:48 PST 2021


jeroen.dobbelaere added a subscriber: asbirlea.
jeroen.dobbelaere added a comment.

In D92887#2514156 <https://reviews.llvm.org/D92887#2514156>, @asbirlea wrote:

> My concern with this patch is in the iteration on all instructions in the blocks in `cloneAndAdaptNoAliasScopes` and `identifyNoAliasScopesToClone`. 
> Perhaps for LoopUnroll is not an issue, if unroll cost model is taken into account before this (i.e. unroll doesn't happen for large BBs). But when doing loop rotate, this may explode for IRs with large BBs, so I'd say some measurements would be helpful here.
> For loop rotate, which instructions are cloned from the header to the preheader is known at the callsite, so as to not iterate over the entire original preheader, but I'm not sure this is sufficient.

One problem I see is that it is possible that instructions with references to the scopes have been moved before a llvm.experimental.noalias.scope.decl. On the other hand, as far as I see, it should not be 'wrong' to only duplicate the scopes for the instructions that have been moved: at worst, analysis will fall back to 'MayAlias' when comparing a modified to a non-modified version.

I'll try to reduce the instruction range for the OrigPreHeader.


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

https://reviews.llvm.org/D94306



More information about the llvm-commits mailing list