This is an archive of the discontinued LLVM Phabricator instance.

[AST] Only store the needed data in SwitchStmt.
ClosedPublic

Authored by riccibruno on Oct 25 2018, 10:03 AM.

Details

Summary

Don't store the data for the init statement and condition variable
if not needed. This cuts the size of SwitchStmt by up to 2 pointers.
The order of the children is kept the same.

Also use the newly available space in the bit-fields of Stmt
to store the bit representing whether all enum have been covered
instead of using a PointerIntPair.

Diff Detail

Repository
rL LLVM

Event Timeline

riccibruno created this revision.Oct 25 2018, 10:03 AM
riccibruno added a reviewer: rsmith.

Add a flag to the output of -ast-dump indicating which sub-statement
a SwitchStmt is storing. This removes the ambiguity in the output
of -ast-dump as per rsmith's comment in D53717.

rjmccall accepted this revision.Oct 26 2018, 9:31 PM

LGTM.

This revision is now accepted and ready to land.Oct 26 2018, 9:31 PM
This revision was automatically updated to reflect the committed changes.