This patch adds a check of alias analysis in noalias callsite argument deduction.
Details
Diff Detail
Event Timeline
llvm/test/Transforms/FunctionAttrs/noalias_returned.ll | ||
---|---|---|
266 | 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. |
Can you hoist the AAR definition and then this LGTM.
llvm/test/Transforms/FunctionAttrs/noalias_returned.ll | ||
---|---|---|
266 | I see. We need to strip the pointer in the float AANoAlias deduction later. |
Hoist this as far out as possible.