summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprComplex.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Create a new expression node, SubstNonTypeTemplateParmExpr,John McCall2011-07-151-0/+4
| | | | | | | | to represent a fully-substituted non-type template parameter. This should improve source fidelity, as well as being generically useful for diagnostics and such. llvm-svn: 135243
* In ARC, reclaim all return values of retainable type, not just thoseJohn McCall2011-07-071-0/+1
| | | | | | | | | | | | where we have an immediate need of a retained value. As an exception, don't do this when the call is made as the immediate operand of a __bridge retain. This is more in the way of a workaround than an actual guarantee, so it's acceptable to be brittle here. rdar://problem/9504800 llvm-svn: 134605
* Cleanup cast IRGen a bit; no intended functionality change.Eli Friedman2011-06-251-26/+62
| | | | llvm-svn: 133864
* C1X: implement generic selectionsPeter Collingbourne2011-04-151-0/+3
| | | | | | | As an extension, generic selection support has been added for all supported languages. The syntax is the same as for C1X. llvm-svn: 129554
* Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad2011-03-301-4/+2
| | | | | | PHINode::Create() giving the (known or expected) number of operands. llvm-svn: 128538
* Remove the "conditional save" hashtables from IR generation.John McCall2011-02-171-6/+1
| | | | llvm-svn: 125761
* Change the representation of GNU ?: expressions to use a different expressionJohn McCall2011-02-171-20/+11
| | | | | | | | | | | | | | | | | | | | | | class and to bind the shared value using OpaqueValueExpr. This fixes an unnoticed problem with deserialization of these expressions where the deserialized form would lose the vital pointer-equality trait; or rather, it fixes it because this patch also does the right thing for deserializing OVEs. Change OVEs to not be a "temporary object" in the sense that copy elision is permitted. This new representation is not totally unawkward to work with, but I think that's really part and parcel with the semantics we're modelling here. In particular, it's much easier to fix things like the copy elision bug and to make the CFG look right. I've tried to update the analyzer to deal with this in at least some obvious cases, and I think we get a much better CFG out, but the printing of OpaqueValueExprs probably needs some work. llvm-svn: 125744
* Save a copy expression for non-trivial copy constructions of catch variables.John McCall2011-02-161-0/+8
| | | | llvm-svn: 125661
* Better framework for conditional cleanups; untested as yet.John McCall2011-01-261-7/+9
| | | | | | | | 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
* Fix warnings found by gcc-4.6, from -Wunused-but-set-variable andJeffrey Yasskin2011-01-181-1/+1
| | | | | | -Wint-to-pointer-cast. llvm-svn: 123719
* Ensure an insertion point at the end of a statement-expression.John McCall2011-01-131-4/+4
| | | | | | Fixes PR8967. llvm-svn: 123360
* 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
* __block variables require us to evaluate the RHS of an assignment beforeJohn McCall2010-12-061-1/+1
| | | | | | | | | | the LHS, or else the pointer might be invalid. This is kindof dumb, but go ahead and make sure we're doing that for l-value scalar assignment, which fixes a miscompile of obj-c++.dg/block-seq.mm. Leave a FIXME for how to solve this problem for agg __blocks. llvm-svn: 120992
* Fix a bug in the emission of __real/__imag l-values on scalar operands.John McCall2010-12-051-7/+8
| | | | | | | | | 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
* Remove some defensive calls to EmitLoadOfPropertyRefLValue that shouldn'tJohn McCall2010-12-041-16/+19
| | | | | | | be required, and then fix up some missing loads on overloaded-operator paths which that exposed. llvm-svn: 120896
* Although we currently have explicit lvalue-to-rvalue conversions, they'reJohn McCall2010-12-041-1/+16
| | | | | | | | | | | | | | | | | | | 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-19/+7
| | | | | | 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
* Support compound complex operations as l-values in C++. Add a testJohn McCall2010-11-161-0/+23
| | | | | | | case based on CodeGen/volatile-1.c which tests the current C++ semantics, and note the many, many places we fall short of them. llvm-svn: 119402
* Simplify some complex emission and implement correct semantics forJohn McCall2010-11-161-62/+65
| | | | | | | | | 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
* Teach complex compound assignment IR-generation that the RHS ofJohn McCall2010-11-161-3/+7
| | | | | | a compound assignment is always already in the computation type. llvm-svn: 119330
* Always emit full loads from volatile complex l-values.John McCall2010-11-141-10/+3
| | | | | | | | Return the result of a complex assignment with the original values, not by performing a load from the l-value; this is the correct semantics in C, although not in C++. llvm-svn: 119037
* Add a few more complex-related cast kinds that arise due to arbitraryJohn McCall2010-11-141-0/+2
| | | | | | | | | | 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-0/+2
| | | | | | between complex types. llvm-svn: 118994
* Implements in IRgen gnu extensions missing LHS forFariborz Jahanian2010-09-201-13/+20
| | | | | | complex conditionals. Radar 8453812. llvm-svn: 114376
* GCC didn't care for my attempt at API compatibility, so brute-force everythingJohn McCall2010-08-251-2/+2
| | | | | | to the new constants. llvm-svn: 112047
* Add lvalue-bitcast support for complex numbers.Douglas Gregor2010-07-141-5/+16
| | | | llvm-svn: 108363
* Whenever we're creating an expression that is typically an rvalueDouglas Gregor2010-07-131-2/+2
| | | | | | | | | | | | | | | | (e.g., a call, cast, etc.), immediately adjust the expression's type to strip cv-qualifiers off of all non-class types (in C++) or all types (in C). This effectively extends my previous fix for PR7463, which was restricted to calls, to other kinds of expressions within similar characteristics. I've audited every use of getNonReferenceType() in the code base, switching to the newly-renamed getNonLValueExprType() where necessary. Big thanks to Eli for pointing out just how incomplete my original fix for PR7463 actually was. We've been handling cv-qualifiers on rvalues wrong for a very, very long time. Fixes PR7463. llvm-svn: 108253
* Reinstate the fix for PR7556. A silly use of isTrivial() wasDouglas Gregor2010-07-081-1/+1
| | | | | | suppressing copies of objects with trivial copy constructors. llvm-svn: 107857
* Revert r107828 and r107827, the fix for PR7556, which seems to beDouglas Gregor2010-07-071-1/+1
| | | | | | breaking bootstrap on Linux. llvm-svn: 107837
* Rename CXXZeroInitValueExpr to CXXScalarValueInitExpr, to reflect itsDouglas Gregor2010-07-071-1/+1
| | | | | | newly-narrowed scope. No functionality change. llvm-svn: 107828
* IRgen: Assignment to Objective-C properties shouldn't reload the value, forDaniel Dunbar2010-06-291-38/+36
| | | | | | | | complex values either. Previously we did this properly for regular assignment, but not for compound assignment. - Also, tidy up assignment code a bit to look more like the scalar path. llvm-svn: 107217
* Code gen for compound assignment of complexFariborz Jahanian2010-03-231-2/+7
| | | | | | | types using property syntax to access setter/getters. (also radar 7351147). llvm-svn: 99307
* Patch to implement code gen. use of compound assignent onFariborz Jahanian2010-03-231-6/+19
| | | | | | properties of complex type. Radar 7351147. llvm-svn: 99299
* Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands2010-02-151-6/+6
| | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96224
* refactor pre/postinc logic into CGF and require the caller to pass in theChris Lattner2010-01-091-35/+4
| | | | | | lvalue to poke, no functionality change. llvm-svn: 93075
* Minor optimization; emit proper unsupported messages for a couple of cases.Eli Friedman2009-12-251-2/+9
| | | | llvm-svn: 92153
* Simplify code. No functionality change.Benjamin Kramer2009-11-291-22/+6
| | | | llvm-svn: 90087
* Remove remaining VISIBILITY_HIDDEN from anonymous namespaces.Benjamin Kramer2009-11-281-2/+1
| | | | llvm-svn: 90044
* Change all the Type::getAsFoo() methods to specializations of Type::getAs().John McCall2009-09-211-10/+10
| | | | | | | | | | | Several of the existing methods were identical to their respective specializations, and so have been removed entirely. Several more 'leaf' optimizations were introduced. The getAsFoo() methods which imposed extra conditions, like getAsObjCInterfacePointerType(), have been left in place. llvm-svn: 82501
* Reflow comments and some minor whitespace fixups.Mike Stump2009-09-091-66/+65
| | | | llvm-svn: 81337
* Using "ObjCImplicitSetterGetterRefExpr" instead of ↵Fariborz Jahanian2009-08-201-2/+2
| | | | | | | | "ObjCImplctSetterGetterRefExpr". A field rename and more comments. llvm-svn: 79537
* Switch to SmallString::str from SmallString::c_str.Daniel Dunbar2009-08-191-4/+11
| | | | | | - Several FIXMEs due to non-Twinification of IRBuilder. llvm-svn: 79455
* Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.Fariborz Jahanian2009-08-181-1/+2
| | | | | | | | Removed an unnecessary loop to get to setters incoming argument. Added DoxyGen comments. Still more work to do in this area (WIP). llvm-svn: 79365
* Update for LLVM API change.Owen Anderson2009-07-311-5/+5
| | | | llvm-svn: 77722
* Canonicalize else spacing.Mike Stump2009-07-301-1/+0
| | | | llvm-svn: 77629
* Update for LLVM API change.Owen Anderson2009-07-271-3/+1
| | | | llvm-svn: 77249
* Switch to using llvm::Value::getName()Daniel Dunbar2009-07-261-2/+2
| | | | llvm-svn: 77147
* Update for LLVM API change.Owen Anderson2009-07-241-1/+1
| | | | llvm-svn: 77012
* Update for LLVM API change, and contextify a bunch of related stuff.Owen Anderson2009-07-141-2/+4
| | | | llvm-svn: 75705
OpenPOWER on IntegriCloud