[Analysis] Generate more precise TBAA tags when one access encloses the other
authorIvan A. Kosarev <ikosarev@accesssoftek.com>
Mon, 18 Dec 2017 20:05:20 +0000 (20:05 +0000)
committerIvan A. Kosarev <ikosarev@accesssoftek.com>
Mon, 18 Dec 2017 20:05:20 +0000 (20:05 +0000)
commita80c79b5bfb7f8632571a2631d9883933600be07
treefa57fcd8b2add8a8e9d2f1f1d84552bed8c33173
parent915897e21b1286d396748cf6bf47cebdae32f41e
[Analysis] Generate more precise TBAA tags when one access encloses the other

There are cases when two tags with different base types denote
accesses to the same direct or indirect member of a structure
type. Currently, merging of such tags results in a tag that
represents an access to an object that has the type of that
member. This patch changes this so that if one of the accesses
encloses the other, then the generic tag is the one of the
enclosed access.

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

llvm-svn: 321019
llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
llvm/test/Transforms/GVN/tbaa.ll
llvm/test/Transforms/NewGVN/tbaa.ll