[PATCH] D67604: [Attributor] Use Alias Analysis in noalias callsite argument deduction

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 16 13:37:24 PDT 2019


jdoerfert accepted this revision.
jdoerfert added a comment.
This revision is now accepted and ready to land.

Can you hoist the AAR definition and then this LGTM.



================
Comment at: llvm/test/Transforms/FunctionAttrs/noalias_returned.ll:266
 ; FIXME: This should be @two_args(i8* noalias %A_0, i8* noalias %B_0)
-; CHECK: tail call void @two_args(i8* %A_0, i8* %B_0)
   tail call void @two_args(i8* %A_0, i8* %B_0)
----------------
uenoku wrote:
> jdoerfert wrote:
> > Why didn't this get resolved?
> This is because, for now, we check noalias for the floating value firsthand: 
> ```
> // (i) Check whether noalias holds in the definition.
> 
>     auto &NoAliasAA = A.getAAFor<AANoAlias>(*this, IRP);
> 
>     if (!NoAliasAA.isAssumedNoAlias())
>       return indicatePessimisticFixpoint();
> ```
> And GEP is not looked in AANoaliasFloaitingValue so `A_0` and `B_0` can't be deduced in this point.
> I think it is too conservative but without this, at least global variable might be deduced as noalias in the current implementation.
I see. We need to strip the pointer in the float AANoAlias deduction later.


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

https://reviews.llvm.org/D67604





More information about the llvm-commits mailing list