Skip to content
Commit 739156ab authored by Ted Kremenek's avatar Ted Kremenek
Browse files

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.

llvm-svn: 43975
parent 11d700bf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment