This is an archive of the discontinued LLVM Phabricator instance.

[AST] Widen the bit-fields of Stmt to 8 bytes
ClosedPublic

Authored by riccibruno on Oct 23 2018, 1:03 PM.

Details

Summary

Although some classes are using the tail padding of Stmt, most of
them are not. In particular the expression classes are not using it
since there is Expr in between, and Expr contains a single pointer.

This patch widen the bit-fields to Stmt to 8 bytes and move some
data from NullStmt, CompoundStmt, LabelStmt, AttributedStmt, SwitchStmt,
WhileStmt, DoStmt, ForStmt, GotoStmt, ContinueStmt, BreakStmt
and ReturnStmt to the newly available space.

In itself this patch do not achieve much but I plan to go through each of
the classes in the statement/expression hierarchy and use this newly
available space. A quick estimation gives me that this should shrink the
size of the statement/expression hierarchy by >10% when parsing all of Boost.

Diff Detail

Repository
rL LLVM

Event Timeline

riccibruno created this revision.Oct 23 2018, 1:03 PM
rjmccall accepted this revision.Oct 24 2018, 5:16 PM

LGTM.

This revision is now accepted and ready to land.Oct 24 2018, 5:16 PM
This revision was automatically updated to reflect the committed changes.