aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/PCHBitCodes.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-25 17:48:32 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-25 17:48:32 +0000
commit83941df2745d69c05acee3174c7a265c206f70d9 (patch)
tree00d756b4773781dde6794f589ed2a7650338df49 /include/clang/Frontend/PCHBitCodes.h
parentd3f632eda7a81b00a08f9bd0b3eae1133cb5526b (diff)
Load the selector table lazily from the PCH file.
This results in a 10% speedup on the Cocoa-prefixed "Hello, World!", all of which is (not surprisingly) user time. There was a tiny reduction in the size of the PCH file for Cocoa.h, because certain selectors aren't being written twice. I'm using two new tricks here that I'd like to replicate elsewhere: (1) The selectors not used in the global method pool are packed into the blob after the global method pool's on-disk hash table and stored as keys, so that all selectors are in the same blob. (2) We record the offsets of each selector key when we write it into the global method pool (or after it, in the same blob). The offset table is written as a blob, so that we don't need to pack/unpack a SmallVector with its contents. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70055 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/PCHBitCodes.h')
-rw-r--r--include/clang/Frontend/PCHBitCodes.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/clang/Frontend/PCHBitCodes.h b/include/clang/Frontend/PCHBitCodes.h
index ba9d3e4c9d..26e2c1744c 100644
--- a/include/clang/Frontend/PCHBitCodes.h
+++ b/include/clang/Frontend/PCHBitCodes.h
@@ -68,10 +68,7 @@ namespace clang {
/// \brief The block containing the definitions of all of the
/// declarations stored in the PCH file.
- DECLS_BLOCK_ID,
-
- /// \brief The block containing ObjC selectors stored in the PCH file.
- SELECTOR_BLOCK_ID
+ DECLS_BLOCK_ID
};
/// \brief Record types that occur within the PCH block itself.
@@ -167,8 +164,9 @@ namespace clang {
/// declarations.
LOCALLY_SCOPED_EXTERNAL_DECLS = 11,
- /// \brief Record code for the Objective-C Selector Table.
- SELECTOR_TABLE = 12,
+ /// \brief Record code for the table of offsets into the
+ /// Objective-C method pool.
+ SELECTOR_OFFSETS = 12,
/// \brief Record code for the Objective-C method pool,
METHOD_POOL = 13