aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/RangeConstraintManager.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-21 22:25:48 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-21 22:25:48 +0000
commit668c1a4fdcc56bdd050256b1688e116fe84b72db (patch)
treebd72a7861c9d2ba6b5f1b37cd41aa12910c20a8b /lib/Analysis/RangeConstraintManager.cpp
parent5b54b88c4082bb81b8b341b622fda9a85cbd5fad (diff)
Lazy deserialization of the declaration chains associated with
identifiers from a precompiled header. This patch changes the primary name lookup method for entities within a precompiled header. Previously, we would load all of the names of declarations at translation unit scope into a large DenseMap (inside the TranslationUnitDecl's DeclContext), and then perform a special "last resort" lookup into this DeclContext when we knew there was a PCH file (see Sema::LookupName). Now, when we see an identifier named for the first time, we load all of the declarations with that name that are visible from the translation unit into the IdentifierInfo's chain of declarations. Thus, the explicit "look into the translation unit's DeclContext" code is gone, and Sema effectively uses the same IdentifierInfo-based name lookup mechanism whether we are using a PCH file or not. This approach should help PCH scale with the size of the input program rather than the size of the PCH file. The "Hello, World!" application with Carbon.h as a PCH file now loads 20% of the identifiers in the PCH file rather than 85% of the identifiers. 90% of the 20% of identifiers loaded are actually loaded when we deserialize the preprocessor state. The next step is to make the preprocessor load macros lazily, which should drastically reduce the number of types, declarations, and identifiers loaded for "Hello, World". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69737 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/RangeConstraintManager.cpp')
0 files changed, 0 insertions, 0 deletions