Steve Naroff
a23cc79654
Move Decl::NextDeclarator (w/ setters/getters) down to ScopedDecl/FieldDecl.
...
Decl is now svelte:-)
llvm-svn: 41935
2007-09-13 23:52:58 +00:00
Chris Lattner
69de3f4af6
When dumping out errors about unsupported stuff, emit loc info.
...
llvm-svn: 41907
2007-09-13 01:17:29 +00:00
Chris Lattner
4647a21825
Generalize RValue to handle complex better, generalize EmitCompoundStmt to
...
support any sort of expr, add a new EmitAnyExpr routine.
llvm-svn: 41660
2007-08-31 22:49:20 +00:00
Chris Lattner
04a913b958
implement code generation for scalar stmt expressions.
...
llvm-svn: 41656
2007-08-31 22:09:40 +00:00
Chris Lattner
6c555f96e8
eliminate EmitAnyExpr, inlining it and simplifying it into its only caller.
...
llvm-svn: 41468
2007-08-26 22:58:05 +00:00
Chris Lattner
b84bb95b44
be slightly more volatile correct
...
llvm-svn: 41444
2007-08-26 16:22:13 +00:00
Chris Lattner
45067906ad
Fix return of aggregate and return of complex.
...
llvm-svn: 41437
2007-08-26 07:14:44 +00:00
Chris Lattner
44d3e74e22
these implicit conversions are now explicit :)
...
llvm-svn: 41436
2007-08-26 07:09:42 +00:00
Chris Lattner
2da04b3322
completely refactor codegen of scalar expressions out into its own CGExprScalar.cpp file.
...
This patch temporarily breaks compound assignment operators, but greatly simplifies many
things.
llvm-svn: 41355
2007-08-24 05:35:26 +00:00
Chris Lattner
08b15df766
implement passing of complex and aggregates through call args.
...
llvm-svn: 41344
2007-08-23 23:43:33 +00:00
Chris Lattner
cbfc73b26c
Split complex arithmetic codegen out from aggregate codegen.
...
This means that we get rid of tons of intermediate allocas. For
example:
void foo(double _Complex a, double _Complex b) {
a = b+a+a;
}
this used to have 4 temporary allocas, now it has zero of them.
This also simplifies the individual visitor methods because they
now can all operate on real/imag pairs instead of having to
load/store all over the place.
llvm-svn: 41217
2007-08-21 05:54:00 +00:00
Chris Lattner
6278e6ac30
start splitting out aggregate value computation from EmitExpr into EmitAggExpr.
...
aggregate value and scalar expression computation are very different, this
gets them away from each other. This causes a temporary regression on some
complex number examples.
llvm-svn: 41014
2007-08-11 00:04:45 +00:00
Chris Lattner
e73e4322d6
Implement break and continue. Patch by Anders Carlsson!
...
llvm-svn: 39927
2007-07-16 21:28:45 +00:00
Chris Lattner
a5ba0cb772
silence a bogus gcc warning.
...
llvm-svn: 39824
2007-07-13 20:07:11 +00:00
Chris Lattner
bd4de5df77
Fix "no newline at end of file" warnings. Patch contributed by
...
Benoit Boissinot!
llvm-svn: 39780
2007-07-12 15:43:07 +00:00
Chris Lattner
08c4b9ffec
Add support for codegen'ing vector subscripts, at least when they are lvalues.
...
llvm-svn: 39724
2007-07-10 21:17:59 +00:00
Chris Lattner
54fb19efaa
implement support for struct and complex returns.
...
llvm-svn: 39674
2007-06-22 22:02:34 +00:00
Chris Lattner
f033c147c9
remove location tracking for target info
...
llvm-svn: 39671
2007-06-22 19:05:19 +00:00
Chris Lattner
23b7eb677d
Finally bite the bullet and make the major change: split the clang namespace
...
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
2007-06-15 23:05:46 +00:00
Chris Lattner
cf98efa73b
Implement implicit conversions in return stmts.
...
llvm-svn: 39653
2007-06-13 20:50:31 +00:00
Chris Lattner
1ad38f8fee
codegen all declarators in a declstmt, allowing us to successfully codegen
...
stuff like:
void test() {
int *X, Y, *Z[14];
X[Y] = 4;
}
llvm-svn: 39624
2007-06-09 01:20:56 +00:00
Chris Lattner
8394d795c3
implement codegen of a bunch more loop constructs and most expressions
...
llvm-svn: 39593
2007-06-05 20:53:16 +00:00
Chris Lattner
946aa31f02
implement codegen of while stmts and lvalue evaluation of paren exprs :)
...
llvm-svn: 39582
2007-06-05 03:59:43 +00:00
Chris Lattner
f0106d2578
Refactor EvaluateScalarValueToBool out of if statement emission, so it can
...
be shared.
Implement infrastructure for unary operator emission.
Implement basic logical not support. We now compile:
register short X;
if (!X) {
into:
%tmp = load i16* %X ; <i16> [#uses=1]
%tobool = icmp ne i16 %tmp, 0 ; <i1> [#uses=1]
%lnot = xor i1 %tobool, true ; <i1> [#uses=1]
zext i1 %lnot to i32 ; <i32>:0 [#uses=1]
%tobool1 = icmp ne i32 %0, 0 ; <i1> [#uses=1]
br i1 %tobool1, label %ifthen, label %ifend
llvm-svn: 39559
2007-06-02 19:33:17 +00:00
Chris Lattner
84915fa79b
Start stubbing out decl codegen.
...
llvm-svn: 39550
2007-06-02 04:16:21 +00:00
Chris Lattner
3f3dbeedd3
implement codegen support for return of void and simple scalars.
...
llvm-svn: 39547
2007-06-02 03:19:07 +00:00
Chris Lattner
db91b16755
stub out codegen of binary plus. We now compile:
...
if (11 + 42) {
to:
%tmp = add i32 11, 42 ; <i32> [#uses=1]
%tobool = icmp ne i32 %tmp, 0 ; <i1> [#uses=1]
br i1 %tobool, label %ifthen, label %ifend
but this doesn't handle any of the interesting/hard stuff yet.
llvm-svn: 39545
2007-06-02 00:16:28 +00:00
Chris Lattner
e47e440c42
split stmt/expr codegen into their own files.
...
llvm-svn: 39540
2007-06-01 18:02:12 +00:00