diff options
author | Ted Kremenek <kremenek@apple.com> | 2007-11-10 02:11:55 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2007-11-10 02:11:55 +0000 |
commit | eae5cd010e41c90da72a2f9d49cff579e6adba35 (patch) | |
tree | 0841ad86cd174949e05c359db3cfb8990668c7e3 /Lex/Preprocessor.cpp | |
parent | 7a1f4dbb9c57b0109082660213f52238a65d68db (diff) |
Changed the serialization of IdentifierTable to only serialize out entries
that are referenced in the ASTs. This assumes that we serialize out the
decls/stmts first, and use the pointer-tracking logic in the Serializer to
determine if an IdentifierInfo (or its string key) is ever referenced.
This is a significant space optimization for serialized ASTs.
Consider the following program:
void foo(int x,int y) {
return x > y ? x : y+1;
}
Here are the sizes of the files for the serialized ASTs:
Full IdentifierTable: 23676 bytes
Only-referenced Identifiers: 304 bytes.
For this simple program, this is a 77% reduction in the file size of the
serialized ASTs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43975 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Lex/Preprocessor.cpp')
0 files changed, 0 insertions, 0 deletions