summaryrefslogtreecommitdiffstats
path: root/clang/CodeGen/CGExpr.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* implicit casts take care of this code, remove it now.Chris Lattner2007-08-261-3/+2
| | | | llvm-svn: 41434
* refactor scalar conversions out into CGExprScalar.cppChris Lattner2007-08-261-58/+2
| | | | llvm-svn: 41433
* tolerate unimplemented codegen betterChris Lattner2007-08-261-3/+4
| | | | llvm-svn: 41424
* Teach emit-llvm for scalars to properly handle compound assignment Chris Lattner2007-08-241-109/+0
| | | | | | operators in all their glory :) llvm-svn: 41373
* completely refactor codegen of scalar expressions out into its own ↵Chris Lattner2007-08-241-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 Lattner2007-08-241-7/+10
| | | | llvm-svn: 41347
* implement passing of complex and aggregates through call args.Chris Lattner2007-08-231-2/+22
| | | | llvm-svn: 41344
* Implement parsing and code generation of Objective-C string literals.Anders Carlsson2007-08-211-0/+2
| | | | llvm-svn: 41238
* move EmitLoadOfComplex/EmitStoreOfComplex into ComplexExprEmitter.Chris Lattner2007-08-211-30/+0
| | | | llvm-svn: 41236
* implement comma for complex.Chris Lattner2007-08-211-1/+1
| | | | llvm-svn: 41235
* and/or/xor are invalid for complex, even integer complex apparently.Chris Lattner2007-08-211-12/+3
| | | | llvm-svn: 41234
* simplify code slightlyChris Lattner2007-08-211-3/+4
| | | | llvm-svn: 41233
* reimplement support for complex comparisons, add support for integer complex ↵Chris Lattner2007-08-211-23/+32
| | | | | | compares. llvm-svn: 41231
* reimplement complex mulChris Lattner2007-08-211-46/+12
| | | | llvm-svn: 41226
* reimplement addition of complex numbers.Chris Lattner2007-08-211-23/+10
| | | | llvm-svn: 41215
* Fix array->pointer decay. This unbreaks test/CodeGen/array.cChris Lattner2007-08-201-1/+26
| | | | llvm-svn: 41202
* Add support for code generation of builtins.Anders Carlsson2007-08-201-0/+10
| | | | llvm-svn: 41188
* Modified ArraySubscriptExpr to have accessors getLHS and getRHS in additionTed Kremenek2007-08-201-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 Lattner2007-08-111-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 Lattner2007-08-101-3/+4
| | | | llvm-svn: 40995
* implement initial codegen for aggregate return functions. This implementsChris Lattner2007-08-101-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 noopChris Lattner2007-08-101-2/+6
| | | | | | bitcast. llvm-svn: 40992
* now that implicit conversions are explicit, we can eliminate Chris Lattner2007-08-081-130/+31
| | | | | | EmitUsualArithmeticConversions. llvm-svn: 40931
* now that implicit conversions are explicit, we can eliminateChris Lattner2007-08-081-123/+45
| | | | | | EmitExprWithUsualUnaryConversions. llvm-svn: 40929
* Implement codegen for __builtin_choose_expr. For example:Chris Lattner2007-08-041-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_pChris Lattner2007-08-031-0/+8
| | | | llvm-svn: 40788
* Rename AddrLabel and OCUVectorComponent -> AddrLabelExpr and ↵Chris Lattner2007-08-031-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 Lattner2007-08-031-5/+14
| | | | | | | vec2.yx = vec2; // reverse llvm-svn: 40782
* add codegen support for storing into a single-element ocu lvalue, such as:Chris Lattner2007-08-031-10/+39
| | | | | | vec2.x = f; llvm-svn: 40781
* refactor handling of ocuvector lvalue->rvalue codegen into its own method.Chris Lattner2007-08-031-43/+50
| | | | llvm-svn: 40780
* In the common case where we are shuffling a vector, emit anChris Lattner2007-08-031-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.xChris Lattner2007-08-031-2/+12
| | | | llvm-svn: 40777
* implement lvalue to rvalue conversion for ocuvector components. We can now ↵Chris Lattner2007-08-031-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 Lattner2007-08-021-0/+12
| | | | | | | | | | We can now codegen: vec4.xy; as nothing! llvm-svn: 40769
* update this to build with LLVM ToTChris Lattner2007-08-011-2/+2
| | | | llvm-svn: 40665
* Implement code generation for __func__, __FUNCTION__ and __PRETTY_FUNCTION__Anders Carlsson2007-07-211-0/+37
| | | | llvm-svn: 40162
* implement codegen support for sizeof/alignofChris Lattner2007-07-181-1/+25
| | | | llvm-svn: 40009
* Add a hack (mirroring llvm-gcc) to pointer difference Chris Lattner2007-07-161-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 Lattner2007-07-151-1/+1
| | | | llvm-svn: 39884
* add FIXME and un-XFAIL testGabor Greif2007-07-141-0/+2
| | | | llvm-svn: 39858
* A significant refactoring of the type size stuff to also Chris Lattner2007-07-141-1/+2
| | | | | | compute type alignment. This info is needed for struct layout. llvm-svn: 39850
* add a fixmeChris Lattner2007-07-141-0/+2
| | | | llvm-svn: 39847
* implement _Complex * == and !=Gabor Greif2007-07-131-3/+33
| | | | llvm-svn: 39841
* Move getSize() out of type, into ASTContext, where it has target info, andChris Lattner2007-07-131-1/+1
| | | | | | where ASTContext can manage caches for struct layout, etc. llvm-svn: 39835
* implement codegen support for implicit casts.Chris Lattner2007-07-131-6/+10
| | | | llvm-svn: 39831
* "Codegen for Character Literals and Conditional OperatorChris Lattner2007-07-131-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 Lattner2007-07-131-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 Lattner2007-07-131-8/+77
| | | | | | Keith Bauer. llvm-svn: 39793
* implement codegen support for pre/post inc/dec.Chris Lattner2007-07-111-7/+51
| | | | llvm-svn: 39765
* implement codegen support for the "default argument promotions" (C99 6.5.2.2p6).Chris Lattner2007-07-101-3/+34
| | | | | | | Not having this prevented promoting float arguments to double when passed into printf, for example. llvm-svn: 39727
OpenPOWER on IntegriCloud