summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprScalar.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Improve handling of delete expressions.Anders Carlsson2009-08-161-0/+4
| | | | llvm-svn: 79205
* Update for LLVM API change.Owen Anderson2009-08-131-34/+54
| | | | llvm-svn: 78946
* Use the new nsw form of add for signed integer addition.Dan Gohman2009-08-121-2/+11
| | | | llvm-svn: 78765
* Use the inbounds variant of getelementptr for common pointer arithmetic.Dan Gohman2009-08-121-3/+3
| | | | llvm-svn: 78756
* Remove the hack that turns sdiv by a power of 2 to ashr, andDan Gohman2009-08-111-12/+5
| | | | | | | use the new "exact" sdiv to allow LLVM optimization to perform this transformation. llvm-svn: 78739
* Take 2 on AltiVec-style vector initializers. Nate Begeman2009-08-101-1/+1
| | | | | | | | | | | | Fixes PR4704 problems Addresses Eli's patch feedback re: ugly cast code Updates all postfix operators to remove ParenListExprs. While this is awful, no better solution (say, in the parser) is obvious to me. Better solutions welcome. llvm-svn: 78621
* Revert r78535, it is causing a number of failures to build projects.Daniel Dunbar2009-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | --- Reverse-merging r78535 into '.': D test/Sema/altivec-init.c U include/clang/Basic/DiagnosticSemaKinds.td U include/clang/AST/Expr.h U include/clang/AST/StmtNodes.def U include/clang/Parse/Parser.h U include/clang/Parse/Action.h U tools/clang-cc/clang-cc.cpp U lib/Frontend/PrintParserCallbacks.cpp U lib/CodeGen/CGExprScalar.cpp U lib/Sema/SemaInit.cpp U lib/Sema/Sema.h U lib/Sema/SemaExpr.cpp U lib/Sema/SemaTemplateInstantiateExpr.cpp U lib/AST/StmtProfile.cpp U lib/AST/Expr.cpp U lib/AST/StmtPrinter.cpp U lib/Parse/ParseExpr.cpp U lib/Parse/ParseExprCXX.cpp llvm-svn: 78551
* Improve handling of member pointers.Anders Carlsson2009-08-091-0/+8
| | | | llvm-svn: 78536
* AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d);Nate Begeman2009-08-091-1/+1
| | | | | | | | In addition to being defined by the AltiVec PIM, this is also the vector initializer syntax used by OpenCL, so that vector literals are compatible with macro arguments. llvm-svn: 78535
* Add a CK_ArrayToPointerDecay cast kind.Anders Carlsson2009-08-071-0/+1
| | | | llvm-svn: 78434
* Update for LLVM API change.Owen Anderson2009-07-311-8/+8
| | | | llvm-svn: 77722
* Update for LLVM API change.Owen Anderson2009-07-311-3/+3
| | | | llvm-svn: 77686
* Update for LLVM API changes.Owen Anderson2009-07-301-5/+5
| | | | llvm-svn: 77638
* Canonicalize else spacing.Mike Stump2009-07-301-2/+1
| | | | llvm-svn: 77629
* Update for LLVM API change.Owen Anderson2009-07-291-14/+13
| | | | llvm-svn: 77514
* Change uses of:Ted Kremenek2009-07-291-5/+5
| | | | | | | | | | | | | | | | | | | | Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsRecordType() -> Type::getAs<RecordType>() Type::getAsPointerType() -> Type::getAs<PointerType>() Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>() Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>() Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>() Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>() Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsTagType() -> Type::getAs<TagType>() And remove Type::getAsReferenceType(), etc. This change is similar to one I made a couple weeks ago, but that was partly reverted pending some additional design discussion. With Doug's pending smart pointer changes for Types, it seemed natural to take this approach. llvm-svn: 77510
* Code refactoring to define getCXXRecordDeclForPointerTypeFariborz Jahanian2009-07-291-12/+5
| | | | | | and use it in several places. llvm-svn: 77411
* ir-gen derived-to-base conversion in implicit casts.Fariborz Jahanian2009-07-281-1/+15
| | | | llvm-svn: 77374
* Update for LLVM API change.Owen Anderson2009-07-281-3/+3
| | | | llvm-svn: 77368
* Update for LLVM API change.Owen Anderson2009-07-271-4/+6
| | | | llvm-svn: 77249
* Update for LLVM API change.Owen Anderson2009-07-241-23/+23
| | | | llvm-svn: 77012
* Make vectorized floating-point comparisons work without crashing.Eli Friedman2009-07-221-1/+1
| | | | llvm-svn: 76726
* Update for LLVM API change.Owen Anderson2009-07-211-3/+3
| | | | llvm-svn: 76599
* Revert r75641.Anders Carlsson2009-07-181-0/+1
| | | | llvm-svn: 76327
* Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methodsTed Kremenek2009-07-171-5/+5
| | | | | | | | | until Doug Gregor's Type smart pointer code lands (or more discussion occurs). These methods just call the new Type::getAs<XXX> methods, so we still have reduced implementation redundancy. Having explicit getAsXXXType() methods makes it easier to set breakpoints in the debugger. llvm-svn: 76193
* ir-gen for --/++ operators of objc object pointersFariborz Jahanian2009-07-161-1/+19
| | | | | | in 32bit abi. llvm-svn: 76109
* Add member template 'Type::getAs<T>', which converts a Type* to a respective T*.Ted Kremenek2009-07-161-5/+5
| | | | | | | | | | | | | | | | | | | | | This method is intended to eventually replace the individual Type::getAsXXXType<> methods. The motivation behind this change is twofold: 1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of them are basically copy-and-paste. 2) By centralizing the implementation of the getAs<Type> logic we can more smoothly move over to Doug Gregor's proposed canonical type smart pointer scheme. Along with this patch: a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>. b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>. llvm-svn: 76098
* Update for LLVM API change, and contextify a bunch of related stuff.Owen Anderson2009-07-141-56/+63
| | | | llvm-svn: 75705
* Introduce Type::isAnyPointerType() and convert all clients (suggested by Chris).Steve Naroff2009-07-141-1/+1
| | | | | | I don't love the name, however it simplifies the code and is a worthwhile change. If/when we come up with a better name, we can do a search/replace. llvm-svn: 75650
* Rename RecordLayout.h to ASTRecordLayout.hAnders Carlsson2009-07-141-1/+0
| | | | llvm-svn: 75641
* Update for LLVM API change.Owen Anderson2009-07-131-8/+8
| | | | llvm-svn: 75446
* This patch includes a conceptually simple, but very intrusive/pervasive change. Steve Naroff2009-07-101-10/+14
| | | | | | | | | | | | The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches. This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic. By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time. Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks. llvm-svn: 75314
* reimplement vector comparisons as [fi]cmp+sext instead of using v[if]cmp.Chris Lattner2009-07-081-19/+10
| | | | | | | Also, enable them in sema so that they are tested, and now that the x86 backend has stablized. llvm-svn: 74983
* Update clang for the add ->add/fadd split. Likewise for sub and mul.Chris Lattner2009-06-171-6/+18
| | | | llvm-svn: 73604
* Use PushConditionalTempDestruction/PopConditionalTempDestruction for the ↵Anders Carlsson2009-06-041-1/+5
| | | | | | ternary operator. llvm-svn: 72842
* Use conditional temp destruction for || and &&.Anders Carlsson2009-06-041-0/+6
| | | | llvm-svn: 72838
* Add a new function for emitting new functions.Anders Carlsson2009-05-311-0/+3
| | | | llvm-svn: 72656
* Call EmitCXXExprWithTemporaries.Anders Carlsson2009-05-311-2/+1
| | | | llvm-svn: 72652
* Fixup the rest of the trivial cases of the codegen of volatile. IfMike Stump2009-05-291-29/+78
| | | | | | | any body can spot codegen bugs with volatile, or knows of any in the bug database, let me know. llvm-svn: 72572
* Functions that return references can be rvalues as well.Anders Carlsson2009-05-271-0/+3
| | | | llvm-svn: 72457
* Fixup codegen for __block int i; i += rhs();. Should also slightlyMike Stump2009-05-221-4/+5
| | | | | | improve codegen in some cases. llvm-svn: 72273
* Fixup blocks codegen for { __block i; i = rhs(); }, we want the rhsMike Stump2009-05-211-1/+3
| | | | | | | evaluated first. This can also improve codegen just a bit as we might have another register to play with for the evaluation of the rhs. llvm-svn: 72226
* Don't always zext the result of the not unary operator to an int.Anders Carlsson2009-05-191-2/+2
| | | | llvm-svn: 72117
* Have AggExprEmitter::VisitCXXConstructExpr make new variables if necessary. ↵Anders Carlsson2009-05-191-0/+5
| | | | | | Stub out VisitCXXExprWithTemporaries. llvm-svn: 72103
* Fix pointer addressing and array subscripting of Objective-C interfaceDaniel Dunbar2009-04-251-2/+29
| | | | | | | | | | | types. - I broke this in the switch to representing interfaces with opaque types. - <rdar://problem/6822660> clang crashes on subscript of interface in 32-bit mode llvm-svn: 70009
* Clang part of r69947. Reverting back 69574 as it is no longer needed.Sanjiv Gupta2009-04-241-10/+4
| | | | llvm-svn: 69949
* PR3247: Handle a couple of cases where we weren't emitting VLA sizes (and Eli Friedman2009-04-201-1/+5
| | | | | | subsequently crashed). llvm-svn: 69567
* PR3248: Make sure the evaluate the operand of a sizeof when it has a VLA type.Eli Friedman2009-04-201-0/+4
| | | | | | Adapted from patch by Tim Northover. llvm-svn: 69566
* Support code generation of 'this' exprsAnders Carlsson2009-04-141-0/+5
| | | | llvm-svn: 69050
* Make sure value is initialized when built w/o asserts.Daniel Dunbar2009-04-081-0/+1
| | | | llvm-svn: 68615
OpenPOWER on IntegriCloud