Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | implicit casts take care of this code, remove it now. | Chris Lattner | 2007-08-26 | 1 | -3/+2 | |
| | | | | llvm-svn: 41434 | |||||
* | refactor scalar conversions out into CGExprScalar.cpp | Chris Lattner | 2007-08-26 | 1 | -58/+2 | |
| | | | | llvm-svn: 41433 | |||||
* | tolerate unimplemented codegen better | Chris Lattner | 2007-08-26 | 1 | -3/+4 | |
| | | | | llvm-svn: 41424 | |||||
* | Teach emit-llvm for scalars to properly handle compound assignment | Chris Lattner | 2007-08-24 | 1 | -109/+0 | |
| | | | | | | operators in all their glory :) llvm-svn: 41373 | |||||
* | completely refactor codegen of scalar expressions out into its own ↵ | Chris Lattner | 2007-08-24 | 1 | -676/+7 | |
| | | | | | | | | | CGExprScalar.cpp file. This patch temporarily breaks compound assignment operators, but greatly simplifies many things. llvm-svn: 41355 | |||||
* | stub out complex -> bool conversion. | Chris Lattner | 2007-08-24 | 1 | -7/+10 | |
| | | | | llvm-svn: 41347 | |||||
* | implement passing of complex and aggregates through call args. | Chris Lattner | 2007-08-23 | 1 | -2/+22 | |
| | | | | llvm-svn: 41344 | |||||
* | Implement parsing and code generation of Objective-C string literals. | Anders Carlsson | 2007-08-21 | 1 | -0/+2 | |
| | | | | llvm-svn: 41238 | |||||
* | move EmitLoadOfComplex/EmitStoreOfComplex into ComplexExprEmitter. | Chris Lattner | 2007-08-21 | 1 | -30/+0 | |
| | | | | llvm-svn: 41236 | |||||
* | implement comma for complex. | Chris Lattner | 2007-08-21 | 1 | -1/+1 | |
| | | | | llvm-svn: 41235 | |||||
* | and/or/xor are invalid for complex, even integer complex apparently. | Chris Lattner | 2007-08-21 | 1 | -12/+3 | |
| | | | | llvm-svn: 41234 | |||||
* | simplify code slightly | Chris Lattner | 2007-08-21 | 1 | -3/+4 | |
| | | | | llvm-svn: 41233 | |||||
* | reimplement support for complex comparisons, add support for integer complex ↵ | Chris Lattner | 2007-08-21 | 1 | -23/+32 | |
| | | | | | | compares. llvm-svn: 41231 | |||||
* | reimplement complex mul | Chris Lattner | 2007-08-21 | 1 | -46/+12 | |
| | | | | llvm-svn: 41226 | |||||
* | reimplement addition of complex numbers. | Chris Lattner | 2007-08-21 | 1 | -23/+10 | |
| | | | | llvm-svn: 41215 | |||||
* | Fix array->pointer decay. This unbreaks test/CodeGen/array.c | Chris Lattner | 2007-08-20 | 1 | -1/+26 | |
| | | | | llvm-svn: 41202 | |||||
* | Add support for code generation of builtins. | Anders Carlsson | 2007-08-20 | 1 | -0/+10 | |
| | | | | llvm-svn: 41188 | |||||
* | Modified ArraySubscriptExpr to have accessors getLHS and getRHS in addition | Ted Kremenek | 2007-08-20 | 1 | -18/+7 | |
| | | | | | | | | | | | | | to getBase and getIdx. getBase and getIdx now return a "normalized" view of the expression (e.g., always "A[4]" instead of possibly "4[A]"). getLHS and getRHS return the expressions with syntactic fidelity to the original source code. Also modified client code of ArraySubscriptExpr, including the AST dumper and pretty printer, the return-stack value checker, and the LLVM code generator. llvm-svn: 41180 | |||||
* | start splitting out aggregate value computation from EmitExpr into EmitAggExpr. | Chris Lattner | 2007-08-11 | 1 | -53/+18 | |
| | | | | | | | | 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 | |||||
* | fix a codegen bug handling ocuvector element exprs. | Chris Lattner | 2007-08-10 | 1 | -3/+4 | |
| | | | | llvm-svn: 40995 | |||||
* | implement initial codegen for aggregate return functions. This implements | Chris Lattner | 2007-08-10 | 1 | -3/+12 | |
| | | | | | | | | | | | | | | | codegen for: _Complex double bar(int); void test(_Complex double*); void test2(int c) { _Complex double X; X = bar(1); test(&X); } llvm-svn: 40993 | |||||
* | Fix a bug handling function -> pointer decay and avoid emitting a noop | Chris Lattner | 2007-08-10 | 1 | -2/+6 | |
| | | | | | | bitcast. llvm-svn: 40992 | |||||
* | now that implicit conversions are explicit, we can eliminate | Chris Lattner | 2007-08-08 | 1 | -130/+31 | |
| | | | | | | EmitUsualArithmeticConversions. llvm-svn: 40931 | |||||
* | now that implicit conversions are explicit, we can eliminate | Chris Lattner | 2007-08-08 | 1 | -123/+45 | |
| | | | | | | EmitExprWithUsualUnaryConversions. llvm-svn: 40929 | |||||
* | Implement codegen for __builtin_choose_expr. For example: | Chris Lattner | 2007-08-04 | 1 | -0/+12 | |
| | | | | | | | | | | | | | | | | | | | struct X { int A; }; void foo() { struct X s; int i; i = __builtin_choose_expr(0, s, i); } compiles to: %tmp = load i32* %i ; <i32> [#uses=1] store i32 %tmp, i32* %i wow :) llvm-svn: 40801 | |||||
* | implement codegen support for __builtin_types_compatible_p | Chris Lattner | 2007-08-03 | 1 | -0/+8 | |
| | | | | llvm-svn: 40788 | |||||
* | Rename AddrLabel and OCUVectorComponent -> AddrLabelExpr and ↵ | Chris Lattner | 2007-08-03 | 1 | -17/+17 | |
| | | | | | | OCUVectorElementExpr respectively. This is for consistency with other expr nodes end with *Expr. llvm-svn: 40785 | |||||
* | implement codegen for multidest ocuvector expressions, like: | Chris Lattner | 2007-08-03 | 1 | -5/+14 | |
| | | | | | | | vec2.yx = vec2; // reverse llvm-svn: 40782 | |||||
* | add codegen support for storing into a single-element ocu lvalue, such as: | Chris Lattner | 2007-08-03 | 1 | -10/+39 | |
| | | | | | | vec2.x = f; llvm-svn: 40781 | |||||
* | refactor handling of ocuvector lvalue->rvalue codegen into its own method. | Chris Lattner | 2007-08-03 | 1 | -43/+50 | |
| | | | | llvm-svn: 40780 | |||||
* | In the common case where we are shuffling a vector, emit an | Chris Lattner | 2007-08-03 | 1 | -2/+19 | |
| | | | | | | | | | | | | | | | | | | | | | llvm vector shuffle instead of a bunch of insert/extract operations. For: vec4 = vec4.yyyy; // splat Emit: %tmp1 = shufflevector <4 x float> %tmp, <4 x float> undef, <4 x i32> < i32 1, i32 1, i32 1, i32 1 > instead of: %tmp1 = extractelement <4 x float> %tmp, i32 1 %tmp2 = insertelement <4 x float> undef, float %tmp1, i32 0 %tmp3 = extractelement <4 x float> %tmp, i32 1 %tmp4 = insertelement <4 x float> %tmp2, float %tmp3, i32 1 %tmp5 = extractelement <4 x float> %tmp, i32 1 %tmp6 = insertelement <4 x float> %tmp4, float %tmp5, i32 2 %tmp7 = extractelement <4 x float> %tmp, i32 1 %tmp8 = insertelement <4 x float> %tmp6, float %tmp7, i32 3 llvm-svn: 40779 | |||||
* | Add support for scalar-returning element accesses like V.x | Chris Lattner | 2007-08-03 | 1 | -2/+12 | |
| | | | | llvm-svn: 40777 | |||||
* | implement lvalue to rvalue conversion for ocuvector components. We can now ↵ | Chris Lattner | 2007-08-03 | 1 | -0/+26 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compile stuff like this: typedef __attribute__(( ocu_vector_type(4) )) float float4; float4 test1(float4 V) { return V.wzyx+V; } to: _test1: pshufd $27, %xmm0, %xmm1 addps %xmm0, %xmm1 movaps %xmm1, %xmm0 ret and: _test1: mfspr r2, 256 oris r3, r2, 4096 mtspr 256, r3 li r3, lo16(LCPI1_0) lis r4, ha16(LCPI1_0) lvx v3, r4, r3 vperm v3, v2, v2, v3 vaddfp v2, v3, v2 mtspr 256, r2 blr llvm-svn: 40771 | |||||
* | add support for codegen of an OCUVectorComponent as an lvalue. | Chris Lattner | 2007-08-02 | 1 | -0/+12 | |
| | | | | | | | | | | We can now codegen: vec4.xy; as nothing! llvm-svn: 40769 | |||||
* | update this to build with LLVM ToT | Chris Lattner | 2007-08-01 | 1 | -2/+2 | |
| | | | | llvm-svn: 40665 | |||||
* | Implement code generation for __func__, __FUNCTION__ and __PRETTY_FUNCTION__ | Anders Carlsson | 2007-07-21 | 1 | -0/+37 | |
| | | | | llvm-svn: 40162 | |||||
* | implement codegen support for sizeof/alignof | Chris Lattner | 2007-07-18 | 1 | -1/+25 | |
| | | | | llvm-svn: 40009 | |||||
* | Add a hack (mirroring llvm-gcc) to pointer difference | Chris Lattner | 2007-07-16 | 1 | -7/+17 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | codegen to compile: int test(int *A, int *B) { return A-B; } into: _test: movl 4(%esp), %eax subl 8(%esp), %eax sarl $2, %eax ret instead of: _test: movl 4(%esp), %eax subl 8(%esp), %eax movl %eax, %ecx sarl $31, %ecx shrl $30, %ecx addl %ecx, %eax sarl $2, %eax ret llvm-svn: 39902 | |||||
* | Refactor code so that isIntegerConstantExpr has an ASTContext available. | Chris Lattner | 2007-07-15 | 1 | -1/+1 | |
| | | | | llvm-svn: 39884 | |||||
* | add FIXME and un-XFAIL test | Gabor Greif | 2007-07-14 | 1 | -0/+2 | |
| | | | | llvm-svn: 39858 | |||||
* | A significant refactoring of the type size stuff to also | Chris Lattner | 2007-07-14 | 1 | -1/+2 | |
| | | | | | | compute type alignment. This info is needed for struct layout. llvm-svn: 39850 | |||||
* | add a fixme | Chris Lattner | 2007-07-14 | 1 | -0/+2 | |
| | | | | llvm-svn: 39847 | |||||
* | implement _Complex * == and != | Gabor Greif | 2007-07-13 | 1 | -3/+33 | |
| | | | | llvm-svn: 39841 | |||||
* | Move getSize() out of type, into ASTContext, where it has target info, and | Chris Lattner | 2007-07-13 | 1 | -1/+1 | |
| | | | | | | where ASTContext can manage caches for struct layout, etc. llvm-svn: 39835 | |||||
* | implement codegen support for implicit casts. | Chris Lattner | 2007-07-13 | 1 | -6/+10 | |
| | | | | llvm-svn: 39831 | |||||
* | "Codegen for Character Literals and Conditional Operator | Chris Lattner | 2007-07-13 | 1 | -1/+47 | |
| | | | | | | | | | | | Both in one patch, and the test case that Chris didn't commit last time is in there too... I'll split the patch up if somebody wants it split." Patch by Keith Bauer. llvm-svn: 39796 | |||||
* | "Someone typed "PtrToInt" where they meant "IntToPtr". | Chris Lattner | 2007-07-13 | 1 | -1/+1 | |
| | | | | | | | | | I've added a tests/CodeGen directory, and a test for this case that used to fail and now passes." Patch by Keith Bauer llvm-svn: 39794 | |||||
* | Implement codegen for + and - with pointers. Patch contributed by | Chris Lattner | 2007-07-13 | 1 | -8/+77 | |
| | | | | | | Keith Bauer. llvm-svn: 39793 | |||||
* | implement codegen support for pre/post inc/dec. | Chris Lattner | 2007-07-11 | 1 | -7/+51 | |
| | | | | llvm-svn: 39765 | |||||
* | implement codegen support for the "default argument promotions" (C99 6.5.2.2p6). | Chris Lattner | 2007-07-10 | 1 | -3/+34 | |
| | | | | | | | Not having this prevented promoting float arguments to double when passed into printf, for example. llvm-svn: 39727 |