summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriterStmt.cpp
diff options
context:
space:
mode:
authorBruno Ricci <riccibrun@gmail.com>2018-10-27 18:43:27 +0000
committerBruno Ricci <riccibrun@gmail.com>2018-10-27 18:43:27 +0000
commit41d11c0e01566241ea9a238a3a8e3e47da20fcf0 (patch)
tree99a8da1b07d5d04c4c0615609ef746abb9d27659 /clang/lib/Serialization/ASTWriterStmt.cpp
parenta365719a248ce2856d30a70881d5a42bdf581115 (diff)
downloadbcm5719-llvm-41d11c0e01566241ea9a238a3a8e3e47da20fcf0.tar.gz
bcm5719-llvm-41d11c0e01566241ea9a238a3a8e3e47da20fcf0.zip
[AST] Widen the bit-fields of Stmt to 8 bytes.
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. Differential Revision: https://reviews.llvm.org/D53604 Reviewed By: rjmccall llvm-svn: 345459
Diffstat (limited to 'clang/lib/Serialization/ASTWriterStmt.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriterStmt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp
index 21051d866d2..fa5c3596853 100644
--- a/clang/lib/Serialization/ASTWriterStmt.cpp
+++ b/clang/lib/Serialization/ASTWriterStmt.cpp
@@ -73,7 +73,7 @@ void ASTStmtWriter::VisitStmt(Stmt *S) {
void ASTStmtWriter::VisitNullStmt(NullStmt *S) {
VisitStmt(S);
Record.AddSourceLocation(S->getSemiLoc());
- Record.push_back(S->HasLeadingEmptyMacro);
+ Record.push_back(S->NullStmtBits.HasLeadingEmptyMacro);
Code = serialization::STMT_NULL;
}
OpenPOWER on IntegriCloud