diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-27 07:35:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-27 07:35:58 +0000 |
commit | ea5ce4705df0743093925585d8edc80e0d8fe3ff (patch) | |
tree | 779e91bfc778df9ce8bb0487f9e55ff7c8ecf0ea /lib/Frontend/PCHWriter.cpp | |
parent | c47be9e5dda1dfcf65ee7a33f35198a16d239b84 (diff) |
add an abbreviation for common PARM_VAR_DECL. All but 9 of the
parm var decls in leopard cocoa.h end up using this abbreviation,
which shrinks the bitcode file by about 50K: 7217736->7167120.
Before:
Block ID #12 (DECLS_BLOCK):
Num Instances: 1
Total Size: 2.23595e+07b/2.79494e+06B/698736W
% of file: 38.7233
Num SubBlocks: 0
Num Abbrevs: 0
Num Records: 139387
% Abbrev Recs: 0
After:
Block ID #12 (DECLS_BLOCK):
Num Instances: 1
Total Size: 2.02405e+07b/2.53006e+06B/632516W
% of file: 35.301
Num SubBlocks: 0
Num Abbrevs: 1
Num Records: 139387
% Abbrev Recs: 19.2902
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70199 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHWriter.cpp')
-rw-r--r-- | lib/Frontend/PCHWriter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Frontend/PCHWriter.cpp b/lib/Frontend/PCHWriter.cpp index d181013a37..bb72f78546 100644 --- a/lib/Frontend/PCHWriter.cpp +++ b/lib/Frontend/PCHWriter.cpp @@ -18,7 +18,6 @@ #include "clang/AST/Decl.h" #include "clang/AST/DeclContextInternals.h" #include "clang/AST/Expr.h" -#include "clang/AST/StmtVisitor.h" #include "clang/AST/Type.h" #include "clang/Lex/MacroInfo.h" #include "clang/Lex/Preprocessor.h" @@ -484,8 +483,8 @@ void PCHWriter::WriteLanguageOptions(const LangOptions &LangOpts) { Record.push_back(LangOpts.Freestanding); // Freestanding implementation Record.push_back(LangOpts.NoBuiltin); // Do not use builtin functions (-fno-builtin) - Record.push_back(LangOpts.ThreadsafeStatics); // Whether static initializers are protected - // by locks. + // Whether static initializers are protected by locks. + Record.push_back(LangOpts.ThreadsafeStatics); Record.push_back(LangOpts.Blocks); // block extension to C Record.push_back(LangOpts.EmitAllDecls); // Emit all declarations, even if // they are unused. @@ -1737,6 +1736,7 @@ pch::DeclID PCHWriter::getDeclID(const Decl *D) { } void PCHWriter::AddDeclarationName(DeclarationName Name, RecordData &Record) { + // FIXME: Emit a stable enum for NameKind. 0 = Identifier etc. Record.push_back(Name.getNameKind()); switch (Name.getNameKind()) { case DeclarationName::Identifier: |