[PATCH] D91576: [MemCpyOpt] Bail on call slot optimization if it merges alias scopes

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 17 16:02:52 PST 2020


hoy added a comment.

In D91576#2400585 <https://reviews.llvm.org/D91576#2400585>, @nikic wrote:

> 



> Adding extra scopes to `alias.scope` should always be conservatively correct

That is also my understanding, but per https://llvm.org/docs/LangRef.html#noalias-and-alias-scope-metadata, in particular this statement:

  "When evaluating an aliasing query, if for some domain, the set of scopes with that domain in one instruction’s alias.scope list is a subset of (or equal to) the set of scopes for that domain in another instruction’s noalias list, then the two memory accesses are assumed not to alias.

, if the extra scopes being added meet the condition above, a no-alias answer could be given. This doesn't sound conservative to me. Please correct me if I miss anything.


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

https://reviews.llvm.org/D91576



More information about the llvm-commits mailing list