[PATCH] D102255: [SelectionDAG] Generate scoped AA metadata when lowering memcpy.
Jeroen Dobbelaere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 27 23:33:01 PDT 2021
jeroen.dobbelaere added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:6399-6422
+ AAMDNodes DstAAInfo, SrcAAInfo;
+ DstAAInfo = SrcAAInfo = NewAAInfo;
+ // Generate new scoped AA metadata for this memcpy instance if enabled.
+ if (EnableMemCpyScopedNoAlias) {
+ MDBuilder MDB(*DAG.getContext());
+ MDNode *Domain =
+ MDB.createAnonymousAliasScopeDomain("MemcpyLoweringDomain");
----------------
As mentioned in D102255#2766721, we still would need to use separate scopes for ever load/store pair.
That's the only way to avoid a possible 'noalias' result when the source and destination happen to be identical.
(based on the AA Techcall discussion, such a situation was considered to be not acceptable).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102255/new/
https://reviews.llvm.org/D102255
More information about the llvm-commits
mailing list