- Jan 28, 2007
-
-
Chris Lattner authored
whose decl objects are lazily created the first time they are referenced. Builtin functions are described by the clang/AST/Builtins.def file, which makes it easy to add new ones. This is missing two important pieces: 1. Support for the rest of the gcc builtins. 2. Support for target-specific builtins (e.g. __builtin_ia32_emms). Just adding this builtins reduces the number of implicit function definitions by 6, reducing the # diagnostics from 550 to 544 when parsing carbon.h. I need to add all the i386-specific ones to eliminate several hundred more. ugh. llvm-svn: 39327
-
Chris Lattner authored
llvm-svn: 39326
-
Chris Lattner authored
translation-unit scope, so we only warn about each implicitly defined function once. This cuts the number of errors parsing carbon.h from 616 to 550. llvm-svn: 39325
-
- Jan 27, 2007
-
-
Chris Lattner authored
proto, then a function body, and they have the same type, don't emit an error. This reduces #errors from 654->616 llvm-svn: 39324
-
Chris Lattner authored
int foo; int foo(); llvm-svn: 39323
-
Chris Lattner authored
llvm-svn: 39322
-
Chris Lattner authored
actually add it into the declspec for the type being parsed. This allows us to do correct semantic analysis on: typedef int bar; int foo() { bar a; return a; } This reduces # errors parsing carbon.h from 731 to 654. llvm-svn: 39321
-
Chris Lattner authored
use the folding set. This eliminates 359 slow lookups from carbon.h (the rest) but doesn't substantially speed up parse. llvm-svn: 39320
-
Chris Lattner authored
search. This reduces 'dumb' lookups from 1225 to 359, speeding up parse of carbon.h from 0.173 to 0.156s (10%). llvm-svn: 39319
-
Chris Lattner authored
llvm-svn: 39318
-
Chris Lattner authored
SmallPtrSet data structure. This datastructure handles the 'nonsmall' case quite gracefully, with an efficient exponentially probed hashtable. This is important for handling global scope, which gets many thousands of decls (e.g. every function and enum value). Of course the typical inner scopes are still as efficient as ever. On my mac pro, this speeds up parsing carbon.h from 0.59s to 0.168s (3.5x), and there is still low hanging fruit :). For reference, GCC on the same system takes 0.33s for -fsyntax-only. llvm-svn: 39317
-
Chris Lattner authored
llvm-svn: 39316
-
Chris Lattner authored
llvm-svn: 39315
-
Chris Lattner authored
llvm-svn: 39314
-
Chris Lattner authored
llvm-svn: 39313
-
Chris Lattner authored
"obviously braindead" linear searches. reduces the number of slow type lookups from 10K to 883 on carbon.h, speeding up parsing from 3.5 to 1.26s. llvm-svn: 39312
-
Chris Lattner authored
a foldingset instead. This reduces the number of slow type lookups from 32K to 10K, which speeds up parsing of carbon.h from 11s to 3.5s. llvm-svn: 39311
-
- Jan 26, 2007
-
-
Chris Lattner authored
llvm-svn: 39310
-
Chris Lattner authored
llvm-svn: 39309
-
Chris Lattner authored
This speeds up parsing carbon.h from 16.0s to 11.3s, reducing slow lookups from 63K to 32K. llvm-svn: 39308
-
Chris Lattner authored
llvm-svn: 39307
-
Chris Lattner authored
ASTContext::getTagDeclType by not having to do a linear search. With this, parse time for carbon.h drops from 21.8s to 16.0s and # slow lookups drop from 83K to 63K. llvm-svn: 39306
-
Chris Lattner authored
*** AST Context Stats: 30594 types total. 19 builtin types 3929 pointer types 308 array types 18883 function types with proto 8 function types with no proto 2988 typename (typedef) types 4459 tagged types 1476 struct types 80 union types 0 class types 2903 enum types 83298 slow type lookups Next up, making type canonicalization not trivially silly. llvm-svn: 39305
-
Chris Lattner authored
llvm-svn: 39304
-
- Jan 25, 2007
-
-
Chris Lattner authored
struct q { int a, a; }; with: t.c:3:19: error: duplicate member 'a' struct q { int a, a; }; ^ t.c:3:16: error: previous definition is here struct q { int a, a; }; ^ llvm-svn: 39303
-
Chris Lattner authored
This emits these diagnostics: t.c:4:14: error: redefinition of 'a' enum foo22 { a, b }; ^ t.c:3:5: error: previous definition is here int a; ^ t.c:8:17: error: redefinition of enumerator 'b' enum foo23 { c, b }; ^ t.c:4:17: error: previous definition is here enum foo22 { a, b }; ^ 4 diagnostics generated. for: int a; enum foo22 { a, b }; enum foo23 { c, b }; llvm-svn: 39302
-
Chris Lattner authored
llvm-svn: 39301
-
Chris Lattner authored
the EnumDecl when the enum type is complete. This allows us to detect redefinitions of enums. llvm-svn: 39300
-
Chris Lattner authored
t.c:2:6: warning: ISO C forbids forward references to 'enum' types enum foo22* X; ^ llvm-svn: 39299
-
Chris Lattner authored
structs and enums. llvm-svn: 39298
-
Chris Lattner authored
llvm-svn: 39297
-
Chris Lattner authored
t.c:10:15: warning: 'bonk' may not be nested in a struct due to flexible array member struct bink bonk; ^ t.c:13:14: error: 'struct bink' may not be used as an array element due to flexible array member struct bink A[123]; ^ for: struct bink { struct bink *a; int X[]; // ok. }; struct foo { int A; struct bink bonk; }; struct bink A[123]; llvm-svn: 39296
-
- Jan 24, 2007
-
-
Chris Lattner authored
struct bork { int X[]; }; struct bink { struct bink a; int X[]; // ok. }; to: t.c:3:7: error: flexible array 'X' not allowed in otherwise empty struct int X[]; ^ t.c:7:15: error: field 'a' has incomplete type struct bink a; ^ llvm-svn: 39295
-
Chris Lattner authored
t.c:5:8: error: field 'foo' declared as a function void foo(); ^ llvm-svn: 39294
-
Chris Lattner authored
llvm-svn: 39293
-
Chris Lattner authored
like: struct S { struct S {} X; }; with: t.c:2:19: error: nested redefinition of 'struct' struct S { struct S {} X; }; ^ t.c:2:1: error: previous definition is here struct S { struct S {} X; }; ^ llvm-svn: 39292
-
- Jan 23, 2007
-
-
Chris Lattner authored
llvm-svn: 39291
-
Chris Lattner authored
llvm-svn: 39290
-
Chris Lattner authored
C99 6.2.5. llvm-svn: 39289
-
Chris Lattner authored
llvm-svn: 39288
-