]> granicus.if.org Git - llvm/commit
[AliasSetTracker] Don't drop AA MD so eagerly
authorKeno Fischer <keno@alumni.harvard.edu>
Thu, 29 Jun 2017 19:13:11 +0000 (19:13 +0000)
committerKeno Fischer <keno@alumni.harvard.edu>
Thu, 29 Jun 2017 19:13:11 +0000 (19:13 +0000)
commitcf416dcc40886a3b59dff7736aa4a939e99219f6
tree46024ee54ebd3943a069d4fd093540d75ecf63f2
parentfb66991577dcd868fce9897ebc59c7047ff13d94
[AliasSetTracker] Don't drop AA MD so eagerly

Summary:
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 AA 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.

Reviewers: hfinkel

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D32139

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306727 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/AliasSetTracker.h
include/llvm/IR/Metadata.h
test/Transforms/LICM/dropped-tbaa.ll [new file with mode: 0644]