| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
until we've had a lot more discussion.
llvm-svn: 71125
|
|
|
|
| |
llvm-svn: 70506
|
|
|
|
|
|
|
|
| |
compatible with VC++ and GCC. The codegen/mangling angle hasn't
been fully ironed out yet. Note that we accept int128_t even in
32-bit mode, unlike gcc.
llvm-svn: 70464
|
|
|
|
|
|
|
| |
compilation if the user requested a PCH file but no such PCH file
exists.
llvm-svn: 70332
|
|
|
|
| |
llvm-svn: 70330
|
|
|
|
|
|
| |
now gotten back about 180k of the 500k we lost.
llvm-svn: 70326
|
|
|
|
|
|
|
|
| |
which eliminates the storage for IdentifierInfo in the "uninteresting
identifier" cases. Sadly, this only brought back 7k of the 500k we
lost :(
llvm-svn: 70325
|
|
|
|
| |
llvm-svn: 70322
|
|
|
|
|
|
|
|
| |
line when using a PCH that were not provided when building the PCH
file. If those names were used as identifiers somewhere in the PCH
file, reject the PCH file.
llvm-svn: 70321
|
|
|
|
|
|
|
|
|
|
| |
for identifiers to separate "interesting" from "uninteresting"
identifiers. However, to cope with compiler invocations where the
predefines buffers mismatch, we need to be able to search the complete
identifier table. Cocoa.h.pch is now about 500k larger that it used to
be :(
llvm-svn: 70320
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PCH file and the predefines buffer used when including the PCH
file. We (explicitly) detect conflicting macro definitions (rejecting
the PCH file) and about missing macro definitions (they'll be
automatically pulled from the PCH file anyway).
We're missing some checking to make sure that new macro definitions
won't have any impact on the PCH file itself (e.g., #define'ing an
identifier that the PCH file used).
llvm-svn: 70316
|
|
|
|
| |
llvm-svn: 70282
|
|
|
|
|
|
|
|
|
| |
Clang version value rather than hard-coding "1.0".
Add PCH and Clang version information into the PCH file. Reject PCH
files with the wrong version information.
llvm-svn: 70264
|
|
|
|
| |
llvm-svn: 70263
|
|
|
|
| |
llvm-svn: 70259
|
|
|
|
|
|
|
| |
processing to after PCH is loaded. -Eonly and -parse-noop are close to working
with PCH now but are not quite there yet.
llvm-svn: 70257
|
|
|
|
|
|
| |
ignore a PCH file.
llvm-svn: 70251
|
|
|
|
|
|
| |
these vectors are very, very rarely used and, when used in headers, and even when used are relatively small, we load them eagerly.
llvm-svn: 70240
|
|
|
|
|
|
| |
entries, shaving 100K off the PCH file for cocoa.
llvm-svn: 70228
|
|
|
|
|
|
|
|
| |
essentially the same thing we do with pretokenized headers. stat()
caching improves performance of the Cocoa-prefixed "Hello, World" by
45%.
llvm-svn: 70223
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
of the normal stream cursor.
llvm-svn: 70198
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
file. In particular, only eagerly load source location entries for
files and for the predefines buffer. Other buffers and
macro-instantiation source location entries are loaded lazily.
With the Cocoa-prefixed "Hello, World", we only load 815/26555 source
location entities. This halves the amount of user time we spend in
this "Hello, World" program with -fsyntax-only (down to .007s).
This optimization is part 1 of 2 for the source manager. This
eliminates most of the user time in loading a PCH file. We still spend
too much time initialize File structures (especially in the calls to
stat), so we need to either make the loading of source location
entries for files lazy or import the stat cache from the PTH
implementation.
llvm-svn: 70196
|
|
|
|
| |
llvm-svn: 70192
|
|
|
|
|
|
| |
extraneous braces.
llvm-svn: 70191
|
|
|
|
|
|
| |
from the DeclsCursor.
llvm-svn: 70190
|
|
|
|
|
|
| |
is part of a decl.
llvm-svn: 70189
|
|
|
|
|
|
| |
read from.
llvm-svn: 70188
|
|
|
|
| |
llvm-svn: 70187
|
|
|
|
| |
llvm-svn: 70186
|
|
|
|
| |
llvm-svn: 70174
|
|
|
|
| |
llvm-svn: 70173
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Deal with the Receiver/ClassInfo shared storage in ObjCMessageExpr
- Implement PCH support for ImplicitParamDecl
- Fix the handling of the body of an ObjCMethodDecl
- Several cast -> cast_or_null fixes
- Make Selector::getIdentifierInfoForSlot work for 1-argument, NULL
selectors.
- Make Selector::getAsString() work with NULL selectors.
- Fix the names of VisitObjCAtCatchStmt and VisitObjCAtFinallyStmt
in the PCH reader and writer; these were never getting called.
At this point, all of the pch-test tests pass for C and Objective-C.
llvm-svn: 70163
|
|
|
|
| |
llvm-svn: 70158
|
|
|
|
| |
llvm-svn: 70143
|
|
|
|
|
|
|
|
|
|
|
| |
necessary and iterate until all types and declarations have been
written. This reduces the Cocoa.h PCH file size by about 4% (since we
don't write types we don't need), and fixes problems where writing a
declaration generates a new type.
This doesn't seem to have any impact on performance either way.
llvm-svn: 70109
|
|
|
|
|
|
| |
the missing bits of ObjCMessageExpr.
llvm-svn: 70100
|
|
|
|
|
|
|
|
|
|
|
|
| |
most of which are ignored. Instead, move the __COUNTER__ value out to
a PCH-level record (since it is handled eagerly) and move the header
file information into the SourceManager block (which is also,
currently, loaded eagerly).
This results in another 17% performance improvement in the
Cocoa-prefixed "Hello, World" with PCH.
llvm-svn: 70097
|
|
|
|
|
|
|
|
| |
PCH file. In the Cocoa-prefixed "Hello, World" benchmark, this takes
us from reading 503 identifiers down to 37 and from 470 macros down to
4. It also results in an 8% performance improvement.
llvm-svn: 70094
|
|
|
|
|
|
|
|
|
|
| |
identifier's ID. In this case, we know where the identifier's entry is
located in the hash table (it starts right before the identifier
string itself), so skip the hash table lookup and read the entry
directly. The performance improvement here is, gain, hard to quantify,
but it's the right thing to do.
llvm-svn: 70078
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"interesting" identifiers (e.g., those where the IdentifierInfo has
some useful information) from "uninteresting" identifiers (where the
IdentifierInfo is just a name). This makes the hash table smaller (so
searching in it should be faster) and, when loading "uninteresting"
identifiers, we skip the lookup in the hash table.
PCH file size is slightly smaller than before (since we don't emit the
contents of the uninteresting IdentifierInfo structures). The
Cocoa.h-prefixed "Hello, World" doesn't show any speedup, although
we're getting to the point where system noise is a bit issue.
llvm-svn: 70075
|
|
|
|
|
|
|
| |
identifiers. They don't yet work, but will inhibit future
optimizations.
llvm-svn: 70071
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
allocating IdentifierInfos with a pointer into the string data stored
in the PCH file rather than having an entry in the identifier table's
string map. However, we don't actually get these savings at the
moment, because we go through the IdentifierTable when loading
identifiers from the on-disk hash table.
This commit is for record-keeping purposes only. I'll be reverting
this change (and the PCH layout tweak that preceded it) because it
appears that implementing this optimization will collide with another,
future optimization to reduce the size of the on-disk hash table for
identifiers. That optimization is likely to provide more benefit (with
less voodoo).
llvm-svn: 70070
|
|
|
|
|
|
| |
file so that the key layout matches that of the PTH key layout
llvm-svn: 70066
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that the PCH reader does not have to decode the VBR encoding at PCH
load time.
Also, reduce the size of the identifier offsets from 64 bits down to
32 bits. The identifier table itself isn't going to grow to more than
4GB :)
Overall, this results in a 13% speedup in the Cocoa-prefixed "Hello,
World" benchmark.
llvm-svn: 70063
|
|
|
|
|
|
|
|
|
|
| |
blobs, so that we don't need to do any work to get these arrays into
memory at PCH load time.
This gives another 19% performance improvement to the Cocoa-prefixed
"Hello, World!".
llvm-svn: 70059
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 70055
|
|
|
|
| |
llvm-svn: 70046
|
|
|
|
| |
llvm-svn: 70044
|
|
|
|
| |
llvm-svn: 70040
|