| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"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
|
| |
|
|
| |
llvm-svn: 70067
|
| |
|
|
|
|
| |
file so that the key layout matches that of the PTH key layout
llvm-svn: 70066
|
| |
|
|
| |
llvm-svn: 70065
|
| |
|
|
| |
llvm-svn: 70064
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 70062
|
| |
|
|
|
|
| |
support -pg, we never instrument :)
llvm-svn: 70061
|
| |
|
|
|
|
|
| |
is no longer needed: a function type and a function declarator are
always known to line up.
llvm-svn: 70060
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Also simplify some syntax in PCHWriter::WritePreprocessor(), suggested by Chris.
llvm-svn: 70039
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
always return a non-null QualType + error bit. This fixes a bunch of
cases that didn't check for null result (and could thus crash) and eliminates
some crappy code scattered throughout sema.
This also improves the diagnostics in the recursive struct case to eliminate
a bogus second error. It also cleans up the case added to function.c by forming
a proper function type even though the declarator is erroneous, allowing the
parameter to be added to the function. Before:
t.c:2:1: error: unknown type name 'unknown_type'
unknown_type f(void*P)
^
t.c:4:3: error: use of undeclared identifier 'P'
P+1;
^
After:
t.c:2:1: error: unknown type name 'unknown_type'
unknown_type f(void*P)
^
llvm-svn: 70023
|
| |
|
|
| |
llvm-svn: 70022
|
| |
|
|
| |
llvm-svn: 70021
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This gets rid of a bunch of random InvalidDecl bools in sema, changing
us to use the following approach:
1. When analyzing a declspec or declarator, if an error is found, we
set a bit in Declarator saying that it is invalid.
2. Once the Decl is created by sema, we immediately set the isInvalid
bit on it from what is in the declarator. From this point on, sema
consistently looks at and sets the bit on the decl.
This gives a very clear separation of concerns and simplifies a bunch
of code. In addition to this, this patch makes these changes:
1. it renames DeclSpec::getInvalidType() -> isInvalidType().
2. various "merge" functions no longer return bools: they just set the
invalid bit on the dest decl if invalid.
3. The ActOnTypedefDeclarator/ActOnFunctionDeclarator/ActOnVariableDeclarator
methods now set invalid on the decl returned instead of returning an
invalid bit byref.
4. In SemaType, refering to a typedef that was invalid now propagates the
bit into the resultant type. Stuff declared with the invalid typedef
will now be marked invalid.
5. Various methods like CheckVariableDeclaration now return void and set the
invalid bit on the decl they check.
There are a few minor changes to tests with this, but the only major bad
result is test/SemaCXX/constructor-recovery.cpp. I'll take a look at this
next.
llvm-svn: 70020
|
| |
|
|
| |
llvm-svn: 70018
|
| |
|
|
|
|
| |
we see what trouble it causes.
llvm-svn: 70017
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
parameters in a functiondecl, even if the decl is invalid and has a confusing
Declarator. On the testcase, we now emit one beautiful diagnostic:
t.c:2:1: error: unknown type name 'unknown_type'
unknown_type f(void*)
^
GCC 4.0 produces:
t.c:2: error: syntax error before ‘f’
t.c: In function ‘f’:
t.c:2: error: parameter name omitted
and GCC 4.2:
t.c:2: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘f’
llvm-svn: 70016
|
| |
|
|
|
|
|
|
|
| |
remove a special case that was apparently for typeof() and
generalize the code in SemaDecl that handles typedefs to
handle any sugar type (including typedef, typeof, etc).
Improve comment to make it more clear what is going on.
llvm-svn: 70015
|
| |
|
|
|
|
| |
static in Decl.cpp.
llvm-svn: 70014
|
| |
|
|
|
|
|
|
|
|
| |
typedef void foo(void);
We get a typedef for a functiontypeproto with no arguments, not
one with one argument and type void. This means the code being
removed in SemaDecl is dead.
llvm-svn: 70013
|
| |
|
|
|
|
| |
don't yet understand where this is happening in llvm-gcc).
llvm-svn: 70012
|
| |
|
|
|
|
| |
functions with prototypes get the bit.
llvm-svn: 70011
|
| |
|
|
| |
llvm-svn: 70010
|
| |
|
|
|
|
|
|
|
|
|
| |
types.
- I broke this in the switch to representing interfaces with opaque
types.
- <rdar://problem/6822660> clang crashes on subscript of interface in
32-bit mode
llvm-svn: 70009
|
| |
|
|
|
|
|
| |
users to specify that a method's argument is visibly retained (reference count
incremented).
llvm-svn: 70008
|
| |
|
|
| |
llvm-svn: 70007
|
| |
|
|
|
|
|
|
| |
to the checker yet, but essentially it allows a user to specify that an
Objective-C method or C function increments the reference count of a passed
object.
llvm-svn: 70005
|
| |
|
|
| |
llvm-svn: 70004
|
| |
|
|
|
|
| |
that we can create metadata
llvm-svn: 70003
|
| |
|
|
| |
llvm-svn: 70002
|
| |
|
|
|
|
|
| |
up to the checker yet, but essentially it allows a user to specify that an
Objective-C method or C function returns an owned an Objective-C object.
llvm-svn: 70001
|
| |
|
|
| |
llvm-svn: 70000
|
| |
|
|
|
|
|
|
| |
by correctly propagating the fact that the type was invalid up to the
attributeRuns decl, then returning an ExprError when attributeRuns is
formed (like we do for normal declrefexprs).
llvm-svn: 69998
|
| |
|
|
| |
llvm-svn: 69996
|
| |
|
|
|
|
| |
the Objective-C interface.
llvm-svn: 69993
|
| |
|
|
|
|
| |
involving an NSAnimation object delegating its release to a delegate method.
llvm-svn: 69992
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(1) Make sure to pad on-disk hash tables with 4 bytes, not 2, since
the reader assumes that bucket data is aligned on 4-byte
boundaries.
(2) Don't emit the number of factory methods twice. This was
throwing off the data counts and therefore causing lookups to
fail. I've added asserts so that this class of error cannot happen
again.
llvm-svn: 69991
|
| |
|
|
|
|
|
|
| |
pools, combined). The methods in the global method pool are lazily
loaded from an on-disk hash table when Sema looks into its version of
the hash tables.
llvm-svn: 69989
|
| |
|
|
| |
llvm-svn: 69988
|
| |
|
|
| |
llvm-svn: 69987
|
| |
|
|
|
|
| |
change.
llvm-svn: 69985
|
| |
|
|
|
|
|
| |
delegates. When a reference counted object is passed as to a 'void*' argument to
a method stop tracking the reference count.
llvm-svn: 69984
|
| |
|
|
| |
llvm-svn: 69983
|