[PATCH] D67604: [Attributor] Use Alias Analysis in noalias callsite argument deduction
Hideto Ueno via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 16 05:52:05 PDT 2019
uenoku added inline comments.
================
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)
----------------
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.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67604/new/
https://reviews.llvm.org/D67604
More information about the llvm-commits
mailing list