This is an archive of the discontinued LLVM Phabricator instance.

[Analysis] Generate more precise TBAA tags when one access encloses the other
ClosedPublic

Authored by kosarev on Nov 2 2017, 8:47 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

kosarev created this revision.Nov 2 2017, 8:47 AM
fhahn added a subscriber: fhahn.Nov 3 2017, 3:27 AM
kosarev updated this revision to Diff 121914.Nov 7 2017, 8:34 AM

Rebased on top of D39732.

hfinkel accepted this revision.Dec 14 2017, 3:13 PM

LGTM

When we move to the new format, we'll need to update this to something conservatively correct with the size field of the access (I assume take the max size and return a new node with that size as necessary). You might also add a TODO note in here so we're more likely to remember.

This revision is now accepted and ready to land.Dec 14 2017, 3:13 PM
This revision was automatically updated to reflect the committed changes.