This is an archive of the discontinued LLVM Phabricator instance.

[AST] Store the OwnedTagDecl as a trailing object in ElaboratedType.
ClosedPublic

Authored by riccibruno on Aug 14 2018, 9:04 AM.

Details

Summary

The TagDecl *OwnedTagDecl in ElaboratedType is quite commonly
null (at least when parsing all of Boost, it is non-null for only about 600
of the 66k ElaboratedType). Therefore we can save a pointer in the
common case by storing it as a trailing object, and storing a bit in the
bit-fields of Type indicating when pointer is null.

Diff Detail

Repository
rL LLVM

Event Timeline

riccibruno created this revision.Aug 14 2018, 9:04 AM
This revision is now accepted and ready to land.Aug 14 2018, 11:07 AM
This revision was automatically updated to reflect the committed changes.