| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 42235
|
|
|
|
|
|
| |
for *which* apfloat to use for a particular type.
llvm-svn: 42234
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
IdentifierTable.
Rationale:
We currently have a separate table to unique ObjC selectors. Since I don't need all the instance data in IdentifierInfo, I thought this would save space (and make more sense conceptually).
It turns out the cost of having duplicate entries for unary selectors (i.e. names without colons) outweighs the cost difference between the IdentifierInfo & SelectorInfo structures. Here is the data:
Two tables:
*** Selector/Identifier Stats:
# Selectors/Identifiers: 51635
Bytes allocated: 1999824
One table:
*** Identifier Table Stats:
# Identifiers: 49500
Bytes allocated: 1990316
llvm-svn: 42139
|
|
|
|
|
|
|
|
|
|
| |
- Add SelectorInfo/SelectorTable classes, modeled after IdentifierInfo/IdentifierTable.
- Add SelectorTable instance to ASTContext, created lazily through ASTContext::getSelectorInfo().
- Add SelectorInfo slot to ObjcMethodDecl.
- Add helper function to derive a SelectorInfo from ObjcKeywordInfo.
Misc: Got the Decl stats stuff up and running again...it was missing support for ObjC AST's.
llvm-svn: 42023
|
|
|
|
| |
llvm-svn: 41693
|
|
|
|
| |
llvm-svn: 41686
|
|
|
|
| |
llvm-svn: 41685
|
|
|
|
| |
llvm-svn: 41582
|
|
|
|
| |
llvm-svn: 41581
|
|
|
|
| |
llvm-svn: 41412
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2) Add support for lexing imaginary constants (a GCC extension):
t.c:5:10: warning: imaginary constants are an extension
A = 1.0iF;
^
3) Make the 'invalid suffix' diagnostic pointer more accurate:
t.c:6:10: error: invalid suffix 'qF' on floating constant
A = 1.0qF;
^
instead of:
t.c:6:10: error: invalid suffix 'qF' on floating constant
A = 1.0qF;
^
llvm-svn: 41411
|
|
|
|
|
|
| |
Convert all clients to the new cleaner, more robust API.
llvm-svn: 41330
|
|
|
|
| |
llvm-svn: 41312
|
|
|
|
|
|
|
|
| |
malloc traffic.
This speeds up -E on xalancbmk by 2.4%
llvm-svn: 40461
|
|
|
|
| |
llvm-svn: 40450
|
|
|
|
|
|
|
|
| |
it did not handle <xyz> headers coming from macro expansions.
This requires special treatment, as the include name is lexed
as multiple tokens, which require reassembly before processing.
llvm-svn: 40418
|
|
|
|
|
|
| |
no functionality changes.
llvm-svn: 40414
|
|
|
|
|
|
|
| |
that required cleaning. If the token required cleaning,
don't include the cleaned tokens in the returned length.
llvm-svn: 40410
|
|
|
|
|
|
|
|
| |
memorybuffer instead of a pointer to the memorybuffer itself. This
reduces coupling and eliminates a pointer dereference on a hot path.
This speeds up -Eonly on 483.xalancbmk by 2.1%
llvm-svn: 40394
|
|
|
|
|
|
| |
compiler inline it. This speeds up -Eonly on 483.xalancbmk by about 1%
llvm-svn: 40393
|
|
|
|
|
|
|
| |
preprocessing 483.xalancbmk by about 10%, reducing the number
of file lookup queries from 2139411 to 199466 (over 10x)
llvm-svn: 40390
|
|
|
|
|
|
|
|
|
|
|
| |
// foo
// bar
// baz
we'd get two levels of call (bcpl & whitespace) for each line, leading to some
seriously deep stacks in some cases.
llvm-svn: 40384
|
|
|
|
|
|
|
| |
redefinition of a macro could cause invalid memory to be deleted.
Found preprocessing 253.perlbmk.
llvm-svn: 40380
|
|
|
|
|
|
|
|
| |
int i = /*/ */ 1;
Thanks to Neil for pointing this out.
llvm-svn: 40379
|
|
|
|
|
|
|
| |
Since that point is now long gone, we should rename LexerToken to
Token, as it is the only kind of token we have.
llvm-svn: 40105
|
|
|
|
|
|
| |
buffer*.
llvm-svn: 40104
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fileid/offset pair, it now contains a bit discriminating between
mapped locations and file locations. This separates the tables for
macros and files in SourceManager, and allows better separation of
concepts in the rest of the compiler. This allows us to have *many*
macro instantiations before running out of 'addressing space'.
This is also more efficient, because testing whether something is a
macro expansion is now a bit test instead of a table lookup (which
also used to require having a srcmgr around, now it doesn't).
This is fully functional, but there are several refinements and
optimizations left.
llvm-svn: 40103
|
|
|
|
|
|
|
|
|
|
| |
#define t(x) #x
t(a
c)
to "a c", not "ac".
llvm-svn: 40060
|
|
|
|
| |
llvm-svn: 40027
|
|
|
|
|
|
| |
a function-like macro invocation. Patch contributed by Neil Booth.
llvm-svn: 40026
|
|
|
|
|
|
|
|
| |
conditional,
just always use strtod. This is temporary code anyway.
llvm-svn: 39972
|
|
|
|
|
|
| |
desired
llvm-svn: 39970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
accurate diagnostics. For test/Lexer/comments.c we now emit:
int x = 000000080; /* expected-error {{invalid digit}} */
^
constants.c:7:4: error: invalid digit '8' in octal constant
00080; /* expected-error {{invalid digit}} */
^
The last line is due to an escaped newline. The full line looks like:
int y = 0000\
00080; /* expected-error {{invalid digit}} */
Previously, we emitted:
constants.c:4:9: error: invalid digit '8' in octal constant
int x = 000000080; /* expected-error {{invalid digit}} */
^
constants.c:6:9: error: invalid digit '8' in octal constant
int y = 0000\
^
which isn't too bad, but the new way is better for the user,
regardless of whether there is an escaped newline or not.
All the other lexer-related diagnostics should switch over
to using AdvanceToTokenCharacter where appropriate. Help
wanted :).
This implements test/Lexer/constants.c.
llvm-svn: 39906
|
|
|
|
|
|
|
| |
specifying the start of a token and a logical (phase 3) character number,
returns a sloc representing the input character corresponding to it.
llvm-svn: 39905
|
|
|
|
| |
llvm-svn: 39897
|
|
|
|
| |
llvm-svn: 39868
|
|
|
|
|
|
| |
virtual->physical mapping explicitly.
llvm-svn: 39867
|
|
|
|
|
|
|
|
|
| |
situations.
This doesn't significantly improve carbon.h, but it does speed up
INPUTS/macro_pounder_obj.c by 48%
llvm-svn: 39864
|
|
|
|
|
|
|
| |
explicitly new'd array. The array never mutates once created, so a vector
is overkill.
llvm-svn: 39862
|
|
|
|
|
|
| |
datastructure itself.
llvm-svn: 39860
|
|
|
|
|
|
| |
code more obvious.
llvm-svn: 39859
|
|
|
|
| |
llvm-svn: 39815
|
|
|
|
| |
llvm-svn: 39797
|
|
|
|
|
|
|
|
| |
Submitted by:
Reviewed by:
Added primitive support for 32-bit floating point literals.
llvm-svn: 39719
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
out of the llvm namespace. This makes the clang namespace be a sibling of
llvm instead of being a child.
The good thing about this is that it makes many things unambiguous. The
bad things is that many things in the llvm namespace (notably data structures
like smallvector) now require an llvm:: qualifier. IMO, libsystem and libsupport
should be split out of llvm into their own namespace in the future, which will fix
this issue.
llvm-svn: 39659
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
int test(int X, short Y, float Z) {
return (int)(X*Y+Z);
}
to:
define i32 @test(i32 %X, i16 %Y, float %Z) {
entry:
%promote = sext i16 %Y to i32 ; <i32> [#uses=1]
%mul = mul i32 %promote, %X ; <i32> [#uses=1]
%promote3 = sitofp i32 %mul to float ; <float> [#uses=1]
%add = add float %promote3, %Z ; <float> [#uses=1]
%conv = fptosi float %add to i32 ; <i32> [#uses=1]
ret i32 %conv
}
with:
$ clang -emit-llvm t.c | llvm-as | opt -std-compile-opts | llvm-dis
llvm-svn: 39652
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Submitted by:
Reviewed by:
Implement semantic analysis for vector_size attribute!
We now produce the following diagnostics...
[administrators-powerbook59:~/llvm/tools/clang] admin% ../../Debug/bin/clang vector.c
vector.c:2:29: error: attribute requires precisely 1 argument
typedef int __attribute__(( vector_size )) tVecp;
^
vector.c:7:32: error: attribute requires precisely 1 argument
extern int foo __attribute__(( vector_size ));
^
vector.c:8:34: error: attribute requires precisely 1 argument
extern float bar __attribute__(( vector_size(16,18) ));
^
vector.c:11:34: error: vector_size requires integer constant (attribute ignored)
extern char foo2 __attribute__(( vector_size(16.2) ));
^ ~~~~
vector.c:21:47: error: invalid vector type 'struct s'
struct s { int a; } structVar __attribute__(( vector_size(16) ));
llvm-svn: 39643
|
|
|
|
|
|
|
|
| |
void foo() {
"\0";
}
llvm-svn: 39638
|
|
|
|
|
|
| |
a // comment, this reduces noise in the llvm testsuite.
llvm-svn: 39636
|
|
|
|
|
|
| |
http://gcc.gnu.org/onlinedocs/gcc/Binary-constants.html#Binary-constants
llvm-svn: 39621
|