This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Refine generation of TBAA info for bit-field lvalues
ClosedPublic

Authored by kosarev on Oct 16 2017, 5:16 AM.

Details

Summary

The main change is that now we generate TBAA info before constructing the resulting lvalue instead of constructing lvalue with some default TBAA info and fixing it as necessary afterwards. We also keep the TBAA info close to lvalue base info, which is supposed to simplify their future merging.

This patch should not bring in any functional changes.

This is part of D38126 reworked to be a separate patch to simplify review.

Diff Detail

Repository
rL LLVM

Event Timeline

kosarev created this revision.Oct 16 2017, 5:16 AM
rjmccall added inline comments.Oct 16 2017, 10:58 PM
lib/CodeGen/CGExpr.cpp
3665 ↗(On Diff #119135)

The new name here doesn't make sense; the base is not an expression, it's an l-value. That and the change in capitalization make it hard to track down the changes you've made to each branch here. I believe all you're doing for the other path is sinking some code past the isBitField() block.

kosarev updated this revision to Diff 119257.Oct 16 2017, 11:31 PM
  • Removed renamings that complicate reviewing.

Yes, some preparation code moved past the isBitField() block and generation of TBAA info moved before creating the bit-field lvalue.

Thanks for catching the BaseExpr renaming.

rjmccall accepted this revision.Oct 16 2017, 11:48 PM

Okay, thanks.

This revision is now accepted and ready to land.Oct 16 2017, 11:48 PM
This revision was automatically updated to reflect the committed changes.