summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprScalar.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Assorted cleanup:John McCall2011-02-151-78/+97
| | | | | | | | | - Have CGM precompute a number of commonly-used types - Have CGF copy that during initialization instead of recomputing them - Use TBAA info when initializing a parameter variable - Refactor the scalar ++/-- code llvm-svn: 125562
* update for ConstantVector API change.Chris Lattner2011-02-151-9/+9
| | | | llvm-svn: 125538
* revert my ConstantVector patch, it seems to have made the llvm-gccChris Lattner2011-02-141-9/+9
| | | | | | builders unhappy. llvm-svn: 125505
* update for ConstantVector::get API change.Chris Lattner2011-02-141-9/+9
| | | | llvm-svn: 125488
* A few more tweaks to the blocks AST representation: John McCall2011-02-071-2/+2
| | | | | | | | | | | | | | | | | - BlockDeclRefExprs always store VarDecls - BDREs no longer store copy expressions - BlockDecls now store a list of captured variables, information about how they're captured, and a copy expression if necessary With that in hand, change IR generation to use the captures data in blocks instead of walking the block independently. Additionally, optimize block layout by emitting fields in descending alignment order, with a heuristic for filling in words when alignment of the end of the block header is insufficient for the most aligned field. llvm-svn: 125005
* pre/post ++/-- for AltiVec vectors. (with builtins-ppc-altivec.c failure fixed)Anton Yartsev2011-02-071-23/+48
| | | | llvm-svn: 125000
* More capturing of 'this': implicit member expressions. Getting thatJohn McCall2011-02-031-3/+3
| | | | | | | | | | | right for anonymous struct/union members led to me discovering some seemingly broken code in that area of Sema, which I fixed, partly by changing the representation of member pointer constants so that IndirectFieldDecls aren't expanded. This led to assorted cleanups with member pointers in CodeGen, and while I was doing that I saw some random other things to clean up. llvm-svn: 124785
* Better framework for conditional cleanups; untested as yet.John McCall2011-01-261-18/+19
| | | | | | | | I'm separately committing this because it incidentally changes some block orderings and minor IR issues, like using a phi instead of an unnecessary alloca. llvm-svn: 124277
* Revert r124146 for now. It appears to be failing on a few platforms.Eric Christopher2011-01-241-48/+23
| | | | llvm-svn: 124153
* pre/post increase/decrease for AltiVec vectorsAnton Yartsev2011-01-241-23/+48
| | | | llvm-svn: 124146
* Send code generation for xvalues down the same path as lvaluesDouglas Gregor2011-01-221-1/+1
| | | | llvm-svn: 124023
* Change QualType::getTypePtr() to return a const pointer, then change aJohn McCall2011-01-191-2/+1
| | | | | | thousand other things which were (generally inadvertantly) relying on that. llvm-svn: 123814
* Replace calls to getTypeSize() and getTypeAlign() with their 'InChars' Ken Dyck2011-01-191-2/+2
| | | | | | counterparts where char units are needed. llvm-svn: 123805
* Ensure an insertion point at the end of a statement-expression.John McCall2011-01-131-2/+4
| | | | | | Fixes PR8967. llvm-svn: 123360
* Add IR generation support for SizeOfPackExpr.Douglas Gregor2011-01-121-0/+5
| | | | llvm-svn: 123332
* Remove the TypesCompatibleExprClass AST node. Merge its functionality into ↵Francois Pichet2010-12-081-6/+1
| | | | | | BinaryTypeTraitExpr. llvm-svn: 121298
* Type traits intrinsic implementation: __is_base_of(T, U)Francois Pichet2010-12-071-0/+4
| | | | | | New AST node introduced: BinaryTypeTraitExpr; to be reused for more intrinsics. llvm-svn: 121074
* Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoreticalJohn McCall2010-12-061-2/+2
| | | | | | reason this is limited to C++, and it's certainly not limited to temporaries. llvm-svn: 120996
* Fix a bug in the emission of __real/__imag l-values on scalar operands.John McCall2010-12-051-7/+4
| | | | | | | | | Fix a bug in the emission of complex compound assignment l-values. Introduce a method to emit an expression whose value isn't relevant. Make that method evaluate its operand as an l-value if it is one. Fixes our volatile compliance in C++. llvm-svn: 120931
* Silly special case: never load when dereferencing void*.John McCall2010-12-041-1/+5
| | | | llvm-svn: 120905
* Although we currently have explicit lvalue-to-rvalue conversions, they'reJohn McCall2010-12-041-5/+13
| | | | | | | | | | | | | | | | | | | not actually frequently used, because ImpCastExprToType only creates a node if the types differ. So explicitly create an ICE in the lvalue-to-rvalue conversion code in DefaultFunctionArrayLvalueConversion() as well as several other new places, and consistently deal with the consequences throughout the compiler. In addition, introduce a new cast kind for loading an ObjCProperty l-value, and make sure we emit those nodes whenever an ObjCProperty l-value appears that's not on the LHS of an assignment operator. This breaks a couple of rewriter tests, which I've x-failed until future development occurs on the rewriter. Ted Kremenek kindly contributed the analyzer workarounds in this patch. llvm-svn: 120890
* Kill the KVC l-value kind and calculate the base expression when emittingJohn McCall2010-12-041-5/+3
| | | | | | the l-value. llvm-svn: 120884
* Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ↵John McCall2010-12-021-4/+0
| | | | | | | | ObjCPropertyRefExpr into the latter. llvm-svn: 120643
* Restore the lvalue-to-rvalue conversion patch with a minimal fix.John McCall2010-12-011-0/+4
| | | | llvm-svn: 120555
* L-value to r-value conversion is not ready for prime-time.John McCall2010-11-301-4/+0
| | | | llvm-svn: 120433
* Introduce an r-value to l-value cast kind. I'm not promising anythingJohn McCall2010-11-301-0/+4
| | | | | | about the reliability of this yet. llvm-svn: 120422
* Switch a lot of call-sites over to using the new value-kind calculations.John McCall2010-11-241-3/+3
| | | | llvm-svn: 120084
* comparison of AltiVec vectors now gives bool result (fix for 7533)Anton Yartsev2010-11-181-0/+108
| | | | llvm-svn: 119678
* Simplify some complex emission and implement correct semantics forJohn McCall2010-11-161-11/+35
| | | | | | | | | assignment to volatiles in C. This in effect reverts some of mjs's work in and around r72572. Basically, the C++ standard is quite clear, except that it lies about volatile behavior approximating C's, whereas the C standard is almost actively misleading. llvm-svn: 119344
* Now that we have reliable cast kinds, simplify scalar cast IR gen.John McCall2010-11-161-36/+3
| | | | llvm-svn: 119332
* Kill CK_Unknown and flesh out the documentation for the existing CastKinds.John McCall2010-11-161-5/+0
| | | | llvm-svn: 119331
* Assorted work leading towards the elimination of CK_Unknown.John McCall2010-11-151-24/+52
| | | | llvm-svn: 119138
* Add a few more complex-related cast kinds that arise due to arbitraryJohn McCall2010-11-141-2/+19
| | | | | | | | | | implicit conversions; the last batch was specific to promotions. I think this is the full set we need. I do think dividing the cast kinds into floating and integral is probably a good idea. Annotate a *lot* more C casts with useful cast kinds. llvm-svn: 119036
* Introduce five new cast kinds for various conversions into andJohn McCall2010-11-131-1/+5
| | | | | | between complex types. llvm-svn: 118994
* Introduce a null-to-pointer implicit cast kind.John McCall2010-11-131-3/+15
| | | | llvm-svn: 118966
* Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a ↵Anders Carlsson2010-10-311-1/+1
| | | | | | getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset. llvm-svn: 117881
* More class anonymization.Benjamin Kramer2010-10-221-1/+1
| | | | llvm-svn: 117106
* Permit constant evaluation of const floating-point variables withJohn McCall2010-10-091-11/+22
| | | | | | constant initializers. llvm-svn: 116138
* Tighter check in r116060 blcoked enums also. Emit enum const's debug info.Devang Patel2010-10-081-3/+3
| | | | llvm-svn: 116071
* Do not repeat debug info for file variable constants.Devang Patel2010-10-081-1/+5
| | | | | | This is tested by file-statics.exp in gdb testsuite. llvm-svn: 116060
* dyn_cast is more appropriate here.Devang Patel2010-10-041-1/+1
| | | | llvm-svn: 115569
* Add missing '}' :)Devang Patel2010-10-041-0/+1
| | | | llvm-svn: 115568
* Emit debug info for an aggregate while processing MemberExpr if the ↵Devang Patel2010-10-041-0/+12
| | | | | | aggregate's debug info was delayed untill now. llvm-svn: 115564
* Patch implements passing arrays to functions expectingFariborz Jahanian2010-09-241-11/+2
| | | | | | vla. Implements pr7827. llvm-svn: 114737
* Fixes an IRgen ICE due to cast of null pointer toFariborz Jahanian2010-09-211-2/+11
| | | | | | a vla type (fixes pr7827). llvm-svn: 114495
* Check in support for OpenCL conditional operator on vector types.Nate Begeman2010-09-201-0/+45
| | | | llvm-svn: 114371
* Add a -ftrapv-handler= option which allows a handler to invoke instead of ↵David Chisnall2010-09-171-5/+43
| | | | | | simply aborting when a signed operation overflows. This mirrors the (GCC-incompatible) behaviour from clang 1.0 and 1.1 when -ftrapv was specified, but allows the handler to be defined for each compilation unit. llvm-svn: 114192
* Patch to add IRgen support for Gnu's conditional operatorFariborz Jahanian2010-09-171-16/+20
| | | | | | | | extension when missing LHS. This patch covers scalar conditionals only. Others are wip. (pr7726, radar 8353567). llvm-svn: 114182
* one piece of code is responsible for the lifetime of every aggregateJohn McCall2010-09-151-2/+2
| | | | | | | | | | | | | slot. The easiest way to do that was to bundle up the information we care about for aggregate slots into a new structure which demands that its creators at least consider the question. I could probably be convinced that the ObjC 'needs GC' bit should be rolled into this structure. Implement generalized copy elision. The main obstacle here is that IR-generation must be much more careful about making sure that exactly llvm-svn: 113962
* Eagerly evaluate type traits in Sema instead of lazily in AST. They actually ↵Sebastian Redl2010-09-131-2/+1
| | | | | | need Sema access to be correct, fixes coming up. llvm-svn: 113782
OpenPOWER on IntegriCloud