This is an archive of the discontinued LLVM Phabricator instance.

Fix TBAA information for reference accesses
ClosedPublic

Authored by kosarev on Sep 20 2017, 3:06 AM.

Details

Diff Detail

Event Timeline

kosarev created this revision.Sep 20 2017, 3:06 AM
kosarev edited the summary of this revision. (Show Details)Sep 20 2017, 3:09 AM
rjmccall edited edge metadata.Sep 22 2017, 12:32 AM

Could you flesh out this test case a bit? Please include at least:

  • the initialization in B::B(S&)
  • a load of the reference value (not the referent)
kosarev added a subscriber: cfe-commits.
kosarev updated this revision to Diff 116325.Sep 22 2017, 4:02 AM

Added a check for the initialization of the reference member in B::B(S&). (That in fact was my original intent; thanks for catching it.)

As to reference loads, we generate them with CodeGenFunction::EmitLoadOfReference() that, in contrast to CodeGenFunction::EmitLoadOfScalar(), is not TBAA-ready yet and looks to be a subject to a separate patch. So, what if we land D38126 first and then eventually re-consider the issue? Thanks again.

kosarev updated this revision to Diff 116326.Sep 22 2017, 4:12 AM

Refined the TODO wording.

rjmccall accepted this revision.Sep 22 2017, 10:07 AM

Sure, that's fine. LGTM.

This revision is now accepted and ready to land.Sep 22 2017, 10:07 AM
This revision was automatically updated to reflect the committed changes.