Christopher Lamb
39aeb4069b
Commit test for CL 44440.
...
llvm-svn: 44514
2007-12-02 07:47:19 +00:00
Chris Lattner
e4f0feb534
Fix buggy test
...
llvm-svn: 44513
2007-12-02 07:46:00 +00:00
Chris Lattner
0475c8178f
globals can't be vla's
...
llvm-svn: 44512
2007-12-02 07:32:25 +00:00
Chris Lattner
d8d18d561e
add codegen support for global inits that require array decay.
...
llvm-svn: 44511
2007-12-02 07:30:13 +00:00
Chris Lattner
d45aa2a03b
warn about unhandled initializers instead of crashing on them.
...
llvm-svn: 44510
2007-12-02 07:19:18 +00:00
Chris Lattner
5bcdf24a50
Handle global variable definitions which change the type of a definition, such as:
...
extern int x[];
void foo() { x[0] = 1; }
int x[10];
void bar() { x[0] = 1; }
llvm-svn: 44509
2007-12-02 07:09:19 +00:00
Chris Lattner
c48023bd5b
remove the alloca insertion point inst, which is an internal helper.
...
llvm-svn: 44508
2007-12-02 06:32:24 +00:00
Chris Lattner
6d27513f6e
merge the llvm global variable when there are multiple C decls.
...
llvm-svn: 44507
2007-12-02 06:30:46 +00:00
Chris Lattner
41af8182d8
implement codegen for functions whose function body type don't match
...
their prototype.
llvm-svn: 44506
2007-12-02 06:27:33 +00:00
Chris Lattner
c5b3aab66b
merge functions with multiple function decls if they have the same name.
...
llvm-svn: 44505
2007-12-02 05:56:05 +00:00
Chris Lattner
e15d0dd63f
Teach clang the prototype for __builtin_alloca.
...
llvm-svn: 44504
2007-12-02 05:42:36 +00:00
Chris Lattner
f0780fae43
convert the rest of the stderr users in codegen to use diagnostics.
...
llvm-svn: 44503
2007-12-02 01:49:16 +00:00
Chris Lattner
fc94434faf
move unsupported warning into a centralized place.
...
llvm-svn: 44502
2007-12-02 01:43:38 +00:00
Chris Lattner
c8dbe1e5d6
Warn about unsupported codegen with the diags machinery, giving us:
...
t.c:3322:5: warning: cannot codegen this yet
__asm__ ("bswap %0" : "+r" (_data));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
instead of:
Unimplemented stmt!
(AsmStmt 0x80eaa0 <t.c:3331:5, line:3334:28>)
llvm-svn: 44501
2007-12-02 01:40:18 +00:00
Chris Lattner
963540dc28
register clz and ctz builtins.
...
llvm-svn: 44500
2007-12-02 01:20:23 +00:00
Chris Lattner
f3a59a1fb8
fix a crash when the rewriter would scan off the beginning of the file.
...
llvm-svn: 44499
2007-12-02 01:13:47 +00:00
Chris Lattner
e6535cfdd2
add support for custom client-specific diagnostics. As a testcase, make the
...
rewriter emit this error if it fails to rewrite an @encode:
t.m:17:9: error: rewriter could not replace sub-expression due to macros
c = ENC(char *)[2] + 4;
^~~~~~~~~~~
... where ENC is: #define ENC @encode
llvm-svn: 44498
2007-12-02 01:09:57 +00:00
Oliver Hunt
a96fe8d5c5
Add support for __builtin_expect which is needed for assert,
...
among other things.
Also change a codegen warning to dump to stderr so it doesn't
mess with -emit-llvm output
llvm-svn: 44497
2007-12-02 01:03:24 +00:00
Chris Lattner
9724ce12f9
improve VC++ compatibility, patch by Cédric Venet.
...
llvm-svn: 44496
2007-12-02 00:47:03 +00:00
Oliver Hunt
aefc8fd415
Support initalisers for more than just int-typed static variables.
...
We now use the CodeGenModule logic for generating the constant
initialiser expression, so happily further initialiser fixes should
automatically work for statics as well.
llvm-svn: 44495
2007-12-02 00:11:25 +00:00
Gordon Henriksen
3e41367dd5
Adding ocamldoc-style comments for the Ocaml bindings.
...
llvm-svn: 44494
2007-12-01 21:01:15 +00:00
Gordon Henriksen
e000c6022f
Fix a typo noticed by Alain Frisch.
...
llvm-svn: 44493
2007-12-01 20:59:23 +00:00
Fariborz Jahanian
9fac54d881
Compute side-effect for conditional expression.
...
llvm-svn: 44492
2007-12-01 19:58:28 +00:00
Chris Lattner
53efb14795
Add #include, patch by Cédric Venet
...
llvm-svn: 44491
2007-12-01 18:59:50 +00:00
Christopher Lamb
7d303b2a20
Better match llvm-gcc's behavior for CodeGen naming of anonymous structs and unions.
...
llvm-svn: 44490
2007-12-01 09:20:34 +00:00
Christopher Lamb
b0e6094a22
When generating the CodeGen type name of a struct, union, enum use the typedef
...
name if a tag type name is not available for the type. This matches how llvm-gcc
chooses CodeGen type names.
This means that "typedef struct {...} foo" now results in a CodeGen name of
"struct.foo" rather than "struct."
llvm-svn: 44489
2007-12-01 09:08:41 +00:00
Seo Sanghyeon
34f92ace1f
Test commit
...
llvm-svn: 44488
2007-12-01 08:06:07 +00:00
Duncan Sands
68b6f50938
Integrate the readonly/readnone logic more deeply
...
into alias analysis. This meant updating the API
which now has versions of the getModRefBehavior,
doesNotAccessMemory and onlyReadsMemory methods
which take a callsite parameter. These should be
used unless the callsite is not known, since in
general they can do a better job than the versions
that take a function. Also, users should no longer
call the version of getModRefBehavior that takes
both a function and a callsite. To reduce the
chance of misuse it is now protected.
llvm-svn: 44487
2007-12-01 07:51:45 +00:00
Chris Lattner
ae7a834e74
make the unused expression warning less noisy by not warning about comma exprs whose
...
LHS and RHS both have side effects.
llvm-svn: 44486
2007-12-01 06:07:34 +00:00
Chris Lattner
e69d662bae
simplify some code, add support for functions without a proto
...
llvm-svn: 44485
2007-12-01 05:58:21 +00:00
Chris Lattner
9e137aad78
fix a couple switch codegen problems Oliver reported.
...
llvm-svn: 44484
2007-12-01 05:27:33 +00:00
Ted Kremenek
3e14c152c6
Fixed bug in the serialization of SelectorTable where we did not register the
...
pointer of MultiKeywordSelectors.
Added optimization to the serialization of SelectorTable where we only serialize
out MultiKeywordSelectors that are ever referenced by an object other than the
SelectorTable.
llvm-svn: 44483
2007-12-01 04:43:17 +00:00
Evan Cheng
388f6f51a0
Fix a bug where splitting cause some unnecessary spilling.
...
llvm-svn: 44482
2007-12-01 04:42:39 +00:00
Owen Anderson
7f09c88977
Fixes for MachineLoopInfo, mostly from Evan. With these, it should be almost useable!
...
llvm-svn: 44480
2007-12-01 03:01:39 +00:00
Evan Cheng
69fda0a716
Allow some reloads to be folded in multi-use cases. Specifically testl r, r -> cmpl [mem], 0.
...
llvm-svn: 44479
2007-12-01 02:07:52 +00:00
Eric Christopher
e62b441b51
Add target triple to include/llvm/Config/config.h.in. Regenerate all files.
...
llvm-svn: 44478
2007-12-01 00:34:39 +00:00
Devang Patel
c7d9af8d6d
Change LinkTimeOptimizer.h install location.
...
llvm-svn: 44477
2007-12-01 00:24:50 +00:00
Devang Patel
0fceaea8be
Change lib lto install location.
...
llvm-svn: 44476
2007-11-30 23:27:57 +00:00
Chris Lattner
4431a1b19b
start partitioning the diagnostics into two classes: those
...
that are builtin and those that are aren't. This is a bunch
of API refactoring that will make this possible, but there is
no functionality change yet.
llvm-svn: 44473
2007-11-30 22:53:43 +00:00
Anders Carlsson
7a9a38abe0
String literals are always valid LValues.
...
llvm-svn: 44472
2007-11-30 22:47:59 +00:00
Ted Kremenek
c9bcda94ae
Implemented serialization of SelectorTable and Selectors.
...
Modified serialization of IdentifierTable to self-register itself with
the Deserializer.
llvm-svn: 44471
2007-11-30 22:46:56 +00:00
Ted Kremenek
8ded669b04
Fixed subtle bug in Deserializer::JumpTo when jumping when the block-nesting
...
information matching did not exactly match the underlying stream's scoping
information.
llvm-svn: 44470
2007-11-30 22:45:05 +00:00
Ted Kremenek
1f80e8b6eb
Fixed potential bug where CurWord is not zeroed out in JumpToBit.
...
llvm-svn: 44469
2007-11-30 22:39:46 +00:00
Chris Lattner
e9c810c87c
pass diagnostics into the rewrite test client.
...
llvm-svn: 44468
2007-11-30 22:25:36 +00:00
Evan Cheng
b10dc27b20
Do not fold reload into an instruction with multiple uses. It issues one extra load.
...
llvm-svn: 44467
2007-11-30 21:23:43 +00:00
Anders Carlsson
3b754452eb
Initialize CurMethodDecl to 0.
...
llvm-svn: 44463
2007-11-30 20:01:38 +00:00
Anders Carlsson
801c5c7467
GCC has an extension where the left hand side of the ? : operator can be omitted. Handle this in a few more places.
...
llvm-svn: 44462
2007-11-30 19:04:31 +00:00
Chris Lattner
907703cecd
chain update requests properly.
...
llvm-svn: 44460
2007-11-30 18:52:58 +00:00
Anders Carlsson
452815a6b2
Initialize LaxVectorConversions.
...
llvm-svn: 44459
2007-11-30 18:29:41 +00:00
Duncan Sands
d4d7f9d69e
Small optimization of parameter attribute lookup.
...
llvm-svn: 44458
2007-11-30 18:20:58 +00:00