| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PCH files now contain complete information about builtins, including
any declarations that have been synthesized as part of building the
PCH file. When using a PCH file, we do not initialize builtins at all;
when needed, they'll be found in the PCH file.
This optimization translations into a 9% speedup for "Hello, World!"
with Carbon.h as a prefix header and roughly a 5% speedup for 403.gcc
with its prefix header. We're also reading less of the PCH file for
"Hello, World!":
*** PCH Statistics:
286/20693 types read (1.382110%)
1630/59230 declarations read (2.751984%)
764/44914 identifiers read (1.701029%)
1/32954 statements read (0.003035%)
5/6187 macros read (0.080815%)
down from
*** PCH Statistics:
411/20693 types read (1.986179%)
2553/59230 declarations read (4.310316%)
1093/44646 identifiers read (2.448148%)
1/32954 statements read (0.003035%)
21/6187 macros read (0.339421%)
llvm-svn: 69815
|
|
|
|
| |
llvm-svn: 69783
|
|
|
|
| |
llvm-svn: 69781
|
|
|
|
|
|
| |
way to serialize selectors yet.
llvm-svn: 69780
|
|
|
|
|
|
|
| |
fix a couple of bugs in reader support for ObjCInterfaceDecl,
and add support for reading ObjCInterfaceType.
llvm-svn: 69779
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This optimization improves performance on the Carbon-prefixed "Hello,
World!" example by 57%. For reference, we're now about 2.25x faster
than GCC PCH. We're also pulling in far less of the PCH file:
*** PCH Statistics:
411/20693 types read (1.986179%)
2553/59230 declarations read (4.310316%)
1093/44646 identifiers read (2.448148%)
1/32954 statements read (0.003035%)
21/6187 macros read (0.339421%)
llvm-svn: 69755
|
|
|
|
|
|
|
| |
unit into the PCH file, since we won't be performing name lookup into
it anyway. Reduces the size of the Carbon.h PCH file by ~200k.
llvm-svn: 69739
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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".
llvm-svn: 69737
|
|
|
|
|
|
|
|
| |
reading/writing all ObjC AST nodes that we will encounter in header files (still a few FIXME's).
Once selector support is in place, we should be able to take this for a spin (and add test cases).
llvm-svn: 69674
|
|
|
|
|
|
|
|
|
|
|
| |
that also includes the contents of the IdentifierInfo itself (the
various fields and flags, along with the chain of identifiers visible
at the top level that have that name).
We don't make any use of the hash table yet, except that our
identifier ID -> string mapping points into the hash table now.
llvm-svn: 69625
|
|
|
|
|
|
|
|
| |
ObjCIvarDecl.
Next step: Add selector support to PCHWriter::AddDeclarationName().
llvm-svn: 69619
|
|
|
|
|
|
| |
PR4023
llvm-svn: 69618
|
|
|
|
|
|
|
|
|
| |
also gets access to the Sema object performing semantic analysis. This
will be used by the PCH writer to serialize Sema state.
No functionality change.
llvm-svn: 69595
|
|
|
|
|
|
| |
Test will be enabled with ObjCInterfaceDecl is added.
llvm-svn: 69594
|
|
|
|
| |
llvm-svn: 69497
|
|
|
|
| |
llvm-svn: 69449
|
|
|
|
|
|
|
|
| |
AST context's __builtin_va_list type will be set when the PCH file is
loaded. This fixes the crash when CodeGen'ing a va_arg expression
pulled in from a PCH file.
llvm-svn: 69421
|
|
|
|
|
|
|
|
| |
lazy PCH deserialization. Propagate that argument wherever it needs to
be. No functionality change, except that I've tightened up a few PCH
tests in preparation.
llvm-svn: 69406
|
|
|
|
|
|
|
| |
from a PCH file. It turns out that "Hello, World!" is bringing in 19%
of all of the statements in Carbon.h, so we need to be lazy.
llvm-svn: 69393
|
|
|
|
|
|
|
| |
This completes support for all of C (+ extensions). We can (again)
build a PCH file for Carbon.h.
llvm-svn: 69385
|
|
|
|
| |
llvm-svn: 69373
|
|
|
|
| |
llvm-svn: 69370
|
|
|
|
| |
llvm-svn: 69369
|
|
|
|
| |
llvm-svn: 69364
|
|
|
|
| |
llvm-svn: 69356
|
|
|
|
|
|
|
| |
Optimize PCH encoding for switch-case statements slightly, by making
the switch-case numbering local to a particular statement.
llvm-svn: 69355
|
|
|
|
| |
llvm-svn: 69334
|
|
|
|
| |
llvm-svn: 69332
|
|
|
|
|
|
| |
compound, case, default, if, switch, and break statements.
llvm-svn: 69329
|
|
|
|
|
|
| |
functionality change.
llvm-svn: 69319
|
|
|
|
| |
llvm-svn: 69256
|
|
|
|
|
|
|
| |
that does not require PCH support for statements. Only AddrLabelExpr,
StmtExpr, and BlockExpr remain (for C).
llvm-svn: 69255
|
|
|
|
| |
llvm-svn: 69251
|
|
|
|
| |
llvm-svn: 69244
|
|
|
|
| |
llvm-svn: 69242
|
|
|
|
| |
llvm-svn: 69240
|
|
|
|
| |
llvm-svn: 69237
|
|
|
|
| |
llvm-svn: 69233
|
|
|
|
| |
llvm-svn: 69225
|
|
|
|
|
|
| |
Some minor cleanup.
llvm-svn: 69196
|
|
|
|
|
|
|
| |
token length in the PCH file rather than trying (and failing) to
reconstruct it be getting the spelling token's length.
llvm-svn: 69191
|
|
|
|
| |
llvm-svn: 69186
|
|
|
|
| |
llvm-svn: 69172
|
|
|
|
| |
llvm-svn: 69169
|
|
|
|
| |
llvm-svn: 69119
|
|
|
|
| |
llvm-svn: 69106
|
|
|
|
|
|
|
|
|
|
| |
kind PCH handles that has an expression as an operand, so most of this
work is in the infrastructure to rebuild expression trees from the
serialized representation. We now store expressions in post-order
(e.g., Reverse Polish Notation), so that we can easily rebuild the
appropriate expression tree.
llvm-svn: 69101
|
|
|
|
| |
llvm-svn: 69084
|
|
|
|
|
|
|
| |
expression (de-)serialization for VLAs, variable initializers,
enum constant initializers, and bitfield widths.
llvm-svn: 69075
|
|
|
|
|
|
|
|
|
| |
non-inline external definitions (and tentative definitions) that are
found at the top level. The corresponding declarations are stored in a
record in the PCH file, so that they can be provided to the
ASTConsumer (via HandleTopLevelDecl) when the PCH file is read.
llvm-svn: 69005
|