diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-27 18:24:17 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-27 18:24:17 +0000 |
commit | eeb0569b5af69c5e003175f559f194d10ede01fe (patch) | |
tree | 0918306514c668ccf912e56ea31a5f48cc600ddd /clang/lib/Frontend/PCHReader.cpp | |
parent | 1cf8069c5fc91ada6f53eec4ad79b60e19b97273 (diff) | |
download | bcm5719-llvm-eeb0569b5af69c5e003175f559f194d10ede01fe.tar.gz bcm5719-llvm-eeb0569b5af69c5e003175f559f194d10ede01fe.zip |
encode the type and decl offsets with 32-bits for entry instead
of 64 bits. This cuts 400KB off the PCH file for cocoa (7.1 ->
6.7MB):
Before:
Record Histogram:
Count # Bits % Abv Record Kind
1 14296 SOURCE_LOCATION_PRELOADS
1 1699598 100.00 SOURCE_LOCATION_OFFSETS
1 1870766 100.00 METHOD_POOL
1 212988 100.00 SELECTOR_OFFSETS
1 88 STATISTICS
1 106 SPECIAL_TYPES
1 18033788 100.00 IDENTIFIER_TABLE
1 1806428 100.00 IDENTIFIER_OFFSET
1 170 100.00 TARGET_TRIPLE
1 268 LANGUAGE_OPTIONS
1 5168252 100.00 DECL_OFFSET
1 952700 100.00 TYPE_OFFSET
After:
Record Histogram:
Count # Bits % Abv Record Kind
1 14296 SOURCE_LOCATION_PRELOADS
1 1699598 100.00 SOURCE_LOCATION_OFFSETS
1 1870766 100.00 METHOD_POOL
1 212988 100.00 SELECTOR_OFFSETS
1 88 STATISTICS
1 106 SPECIAL_TYPES
1 18033788 100.00 IDENTIFIER_TABLE
1 1806428 100.00 IDENTIFIER_OFFSET
1 170 100.00 TARGET_TRIPLE
1 268 LANGUAGE_OPTIONS
1 2584156 100.00 DECL_OFFSET
1 476380 100.00 TYPE_OFFSET
llvm-svn: 70216
Diffstat (limited to 'clang/lib/Frontend/PCHReader.cpp')
-rw-r--r-- | clang/lib/Frontend/PCHReader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/PCHReader.cpp b/clang/lib/Frontend/PCHReader.cpp index bace23ccc62..f26cd84f8d5 100644 --- a/clang/lib/Frontend/PCHReader.cpp +++ b/clang/lib/Frontend/PCHReader.cpp @@ -793,7 +793,7 @@ PCHReader::ReadPCHBlock() { Error("Duplicate TYPE_OFFSET record in PCH file"); return Failure; } - TypeOffsets = (const uint64_t *)BlobStart; + TypeOffsets = (const uint32_t *)BlobStart; TypesLoaded.resize(Record[0]); break; @@ -802,7 +802,7 @@ PCHReader::ReadPCHBlock() { Error("Duplicate DECL_OFFSET record in PCH file"); return Failure; } - DeclOffsets = (const uint64_t *)BlobStart; + DeclOffsets = (const uint32_t *)BlobStart; DeclsLoaded.resize(Record[0]); break; |