[PATCH] D32139: [AliasSetTracker] Don't drop AA MD so eagerly

Keno Fischer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 17 14:32:12 PDT 2017


loladiro created this revision.

When we have patterns like
loop:

  %la = load %ptr, !tbaa
  %lba = load %ptr, !tbaa !noalias

AliasSetTracker would previously think that the two types of annotation for
the pointer conflict, dropping both for the purpose of determining alias sets.
That is clearly way too conservative, as the tbaa is still valid whether or
not one of the memory accesses has additional AA metadata. We could go
one step further and attempt to properly merge the noalias metadata,
but it's not clear that that would be worth it since that may introduce
additional MD nodes, which may be undesirable since this is merely an
Analysis. For now, just take care of the simple case above, and keep
dropping conflicting noalias and alias.scope metadata, but keep tbaa
if it matches.


https://reviews.llvm.org/D32139

Files:
  include/llvm/Analysis/AliasSetTracker.h
  test/Transforms/LICM/dropped-tbaa.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32139.95491.patch
Type: text/x-patch
Size: 4888 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170417/9d4b4a09/attachment.bin>


More information about the llvm-commits mailing list