Граф коммитов

24 Коммитов

Автор SHA1 Сообщение Дата
Devang Patel e9b8c0a385 Fix 80 col violations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43516 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-30 20:59:40 +00:00
Devang Patel 2c30d8fee8 Recognize while(1) and avoid extra blocks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42811 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-09 20:51:27 +00:00
Devang Patel 05f6e6bb3a Recognize "do {} while (0)" idiom and avoid extra basic blocks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42808 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-09 20:33:39 +00:00
Devang Patel 00ee4e4ddc Use const& for RHS.
Use copy for LHS, because it is incremented using ++ operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42792 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-09 17:10:59 +00:00
Devang Patel c049e4f406 Code gen case statement ranges.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42766 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-08 20:57:48 +00:00
Devang Patel 2d79d0f3ac Support case statement ranges.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42648 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-05 20:54:07 +00:00
Devang Patel 51b09f2c52 switch statement code gen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42616 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-04 23:45:31 +00:00
Devang Patel d9363c3a80 Do not codegen dummy block.
Dummy block is an empty block with no predecessors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42451 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-28 21:49:18 +00:00
Steve Naroff 9474504790 Move Decl::NextDeclarator (w/ setters/getters) down to ScopedDecl/FieldDecl.
Decl is now svelte:-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41935 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-13 23:52:58 +00:00
Chris Lattner 419ea7ec6a When dumping out errors about unsupported stuff, emit loc info.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41907 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-13 01:17:29 +00:00
Chris Lattner 9b65551d0b Generalize RValue to handle complex better, generalize EmitCompoundStmt to
support any sort of expr, add a new EmitAnyExpr routine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41660 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-31 22:49:20 +00:00
Chris Lattner 3379320c10 implement code generation for scalar stmt expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41656 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-31 22:09:40 +00:00
Chris Lattner 1e4d21ea58 eliminate EmitAnyExpr, inlining it and simplifying it into its only caller.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41468 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-26 22:58:05 +00:00
Chris Lattner 190dbe203c be slightly more volatile correct
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41444 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-26 16:22:13 +00:00
Chris Lattner 4b0029d5f8 Fix return of aggregate and return of complex.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41437 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-26 07:14:44 +00:00
Chris Lattner e72608b785 these implicit conversions are now explicit :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41436 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-26 07:09:42 +00:00
Chris Lattner 7f02f721d4 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41355 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-24 05:35:26 +00:00
Chris Lattner 23b1cdb0b5 implement passing of complex and aggregates through call args.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41344 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-23 23:43:33 +00:00
Chris Lattner b6ef18a2b0 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41217 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-21 05:54:00 +00:00
Chris Lattner 883f6a7cc7 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41014 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-11 00:04:45 +00:00
Chris Lattner da13870e99 Implement break and continue. Patch by Anders Carlsson!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39927 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-16 21:28:45 +00:00
Chris Lattner a80b0bafd4 silence a bogus gcc warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39824 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 20:07:11 +00:00
Chris Lattner 6fa5f0943a Fix "no newline at end of file" warnings. Patch contributed by
Benoit Boissinot!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39780 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-12 15:43:07 +00:00
Reid Spencer 5f016e2cb5 Stage two of getting CFE top correct.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39734 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-11 17:01:13 +00:00