summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprScalar.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Slight cleanup, and fix for va_arg on architectures where va_list is a Eli Friedman2009-01-201-1/+1
| | | | | | struct. llvm-svn: 62585
* Vector codegen improvementsNate Begeman2009-01-181-4/+20
| | | | llvm-svn: 62458
* Changed the API yet again.Fariborz Jahanian2009-01-161-5/+3
| | | | llvm-svn: 62335
* Used a more suitable api to get to the type of a recordFariborz Jahanian2009-01-161-1/+1
| | | | | | in code gen. llvm-svn: 62326
* Implemented code gen for sizeof(objc class interface).Fariborz Jahanian2009-01-161-1/+8
| | | | llvm-svn: 62289
* make ScalarExprEmitter::EmitCompare() emit the expression with the correct ↵Nuno Lopes2009-01-111-3/+2
| | | | | | | | type instead of always zext it to an int this fixes codegen of simple exprs in C++ like 'if (x != 0)' llvm-svn: 62060
* Emit more refined "unsupported" error for block expressions.Daniel Dunbar2009-01-091-0/+5
| | | | llvm-svn: 61993
* Add codegen support for __nullAnders Carlsson2008-12-211-0/+3
| | | | llvm-svn: 61314
* Implement alignof for vla types.Anders Carlsson2008-12-211-2/+7
| | | | llvm-svn: 61305
* Make sure to emit the size expression for sizeof(type)Anders Carlsson2008-12-211-1/+6
| | | | llvm-svn: 61301
* Make VLAs usable, and make basic usage work correctly. Also, add a Eli Friedman2008-12-201-9/+7
| | | | | | | | | | simple test that actually does VLA codegen. Note that despite the fact that the alloca isn't in the entry block, it should dominate all uses; this is guaranteed by the restrictions on goto into VLA scope in C99. llvm-svn: 61291
* disable Anders' recent VLA patch, this fixes PR3209.Chris Lattner2008-12-131-2/+2
| | | | llvm-svn: 60989
* Implement allocation and sizeof VLAs. This is very basic for now.Anders Carlsson2008-12-121-1/+8
| | | | llvm-svn: 60943
* Fix for PR3150: obvious copy-paste bug in Eli Friedman2008-12-021-2/+2
| | | | | | ScalarExprEmitter::VisitBinLOr. llvm-svn: 60415
* Implemented ir-gen for 'implicit' properties using the new AST nodes.Fariborz Jahanian2008-11-221-0/+3
| | | | llvm-svn: 59886
* Add spec ref to comment.Daniel Dunbar2008-11-191-2/+6
| | | | llvm-svn: 59622
* Fix redundant load of bit-fields on assignment (to get the updatedDaniel Dunbar2008-11-191-16/+13
| | | | | | | | | value). - Use extra argument to EmitStoreThroughLValue to provide place to write update bit-field value if caller requires it. - This fixes several FIXMEs. llvm-svn: 59615
* daniel prefers completed thoughts.Chris Lattner2008-11-161-1/+1
| | | | llvm-svn: 59404
* Normalize many BasicBlock names.Daniel Dunbar2008-11-131-5/+5
| | | | | | | | | | - Use dotted notation for blocks related to a particular statement type. - Use .end for landing pads. No functionality change in NDEBUG mode. :) llvm-svn: 59210
* Rename ?: operator blocks to cond.true and cond.false (I don't knowDaniel Dunbar2008-11-121-2/+2
| | | | | | what "cond.?" means, and this avoids quoting). llvm-svn: 59128
* Lower ?: into select when the selected values are cheap and side-effect-free.Chris Lattner2008-11-121-0/+37
| | | | | | This cuts another 200 lines off expr.ll, forming 23 selects. llvm-svn: 59124
* emit better codegen for ||/&&, shrinking expr.ll by another 240 lines.Chris Lattner2008-11-121-19/+31
| | | | | | | | This happens for stuff like this: x = cond1 || cond2 || cond3 || cond4; llvm-svn: 59123
* use ConstantFoldsToSimpleInteger instead of code emission to doChris Lattner2008-11-121-24/+22
| | | | | | constant folding. llvm-svn: 59121
* Use EmitBranchOnBoolExpr in VisitConditionalOperator. ThisChris Lattner2008-11-121-8/+17
| | | | | | shrinks code yet again by a bit. llvm-svn: 59114
* Move EmitBranchOnBoolExpr and ConstantFoldsToSimpleInteger toChris Lattner2008-11-121-18/+16
| | | | | | | | | | CodeGenFunction.cpp. Change VisitConditionalOperator to use constant fold instead of codegen'ing a constant conditional. Change ForStmt to use EmitBranchOnBoolExpr, this shrinks expr.c very slightly to 40239 lines. llvm-svn: 59113
* Clean up some code to use isZero instead of calling getZExtValue.Chris Lattner2008-11-121-3/+3
| | | | llvm-svn: 59103
* Use createBasicBlock here too.Daniel Dunbar2008-11-121-2/+2
| | | | llvm-svn: 59095
* Rework IRgen invariant w.r.t. current insert point.Daniel Dunbar2008-11-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - EmitStmt is no longer required to finish with a current insertion point defined (i.e. it does not need to make dummy blocks). Instead, it can clear the insertion point in the builder which indicates that the current insertion point is unreachable. - CodeGenFunction provides HaveInsertPoint and EnsureInsertPoint which respectively test if there is an insert point and ensure an insertion point exists (by making a dummy block). - Clearly mark functions in CodeGenFunction which can be called with no insertion point defined. Currently this is a limited set, and EmitStmt simply EnsureInsertPoint()s before emitting subsequent IR. Remove EmitDummyBlock, which is no longer needed. Clients who haven't already cleared the insertion point (typically via EmitBranch) can do so by hand. Remove isDummyBlock, which has effectively been renamed to HaveInsertPoint. The main thrust of this change is that we no longer have create dummy blocks just to destroy them a short time later in EmitBlock in the common case that there is no unreachable code following something like a goto. Additionally, this means that we are not using the hokey condition in isDummyBlock that a block without a name is a dummy block. Guess how well that works when we never emit block names! llvm-svn: 59089
* Try to not emit the dead side of ?: if the condition is a constant.Chris Lattner2008-11-111-4/+21
| | | | llvm-svn: 59061
* Introduce a single AST node SizeOfAlignOfExpr for all sizeof and alignof ↵Sebastian Redl2008-11-111-16/+8
| | | | | | expressions, both of values and types. llvm-svn: 59057
* Add CodeGenFunction::EmitBranch.Daniel Dunbar2008-11-111-2/+2
| | | | | | | - Emits an unconditional branch, with extra logic to avoid generating spurious branches out of dummy blocks. llvm-svn: 59037
* short circuit && and || when possible. This substantially reducesChris Lattner2008-11-111-0/+28
| | | | | | | | the size of the -O0 output on some cases. For example, on expr.c from 176.gcc, it shrinks the .ll file from 43164 to 42835 lines, and removed references to two external symbols. llvm-svn: 59034
* Centralize basic block creation in CodeGenFunction::createBasicBlock.Daniel Dunbar2008-11-111-5/+5
| | | | | | - No functionality change. llvm-svn: 59017
* Implement lowering of va_arg in clang directly. (This is 32-bit X86 only for ↵Anders Carlsson2008-11-041-2/+8
| | | | | | now). llvm-svn: 58681
* Move IRBuilder type definition to common file.Daniel Dunbar2008-11-011-1/+1
| | | | | | - No functionality change. llvm-svn: 58546
* make codegen reject initializes with designators, like this:Chris Lattner2008-10-261-1/+8
| | | | | | | | t.c:1:13: error: cannot codegen this designators yet int a[10] = {2, 4, [8]=9, 10}; ^~~~~~~~~~~~~~~~~ llvm-svn: 58220
* Remove unneeded EncodingRecordTypes argument to getObjCEncodingForType.Daniel Dunbar2008-10-171-3/+1
| | | | llvm-svn: 57716
* Adjust calls to APFloat conversion for new interface.Dale Johannesen2008-10-091-1/+3
| | | | llvm-svn: 57332
* Avoid superfluous errors regarding variable-length arrays (casts).Daniel Dunbar2008-09-041-1/+1
| | | | llvm-svn: 55759
* Downgrade a number of FIXME asserts to ErrorUnsupported.Daniel Dunbar2008-08-291-4/+8
| | | | | | - Notably VLAs llvm-svn: 55544
* Add special "property reference" CodeGen::LValue type for emittingDaniel Dunbar2008-08-291-4/+8
| | | | | | | | Objective-C property references. - This handles property references "more correctly" but setters still don't work. llvm-svn: 55534
* Initial support for Obj-C dot-syntax for getters.Daniel Dunbar2008-08-271-19/+13
| | | | llvm-svn: 55410
* Change another is-a-pointer check to check in terms of LLVM type.Daniel Dunbar2008-08-251-1/+1
| | | | llvm-svn: 55312
* Do is-a-pointer checks in terms of LLVM types inDaniel Dunbar2008-08-251-4/+6
| | | | | | | | | EmitScalarConversion(). - Important for allowing Obj-C void * to id<X> casts and so on. - Not sure about this fix however, perhaps Type should understand that id is effectively a pointer type. llvm-svn: 55311
* Add CodeGen support for CXXZeroInitValueExpr.Argyrios Kyrtzidis2008-08-231-0/+3
| | | | llvm-svn: 55249
* Implement Obj-C ivar references to aggregates.Daniel Dunbar2008-08-231-0/+7
| | | | | | | | | | | Implement Obj-C lvalue message sends (aggregate returns). Update several places to emit more precise ErrorUnsupported warnings for currently unimplemented Obj-C features (main missing chunks are property references, Obj-C exception handling, and the for ... in syntax). llvm-svn: 55234
* Trim CGObjCRuntime::GenerateMessageSend[Super]Daniel Dunbar2008-08-231-6/+5
| | | | | | | | | | | | | | | | | | - Returns an RValue. - Reduced to only taking the CodeGenFunction, Expr, and Receiver. - Becomes responsible for emitting the arguments. Add CodeGenFunction::EmitCallExprExt - Takes optional extra arguments to insert at the head of the call. - This allows the Obj-C runtimes to call into this and isolates the argument and call instruction generation code to one place. Upshot is that we now pass structures (more) correctly. Also, fix one aspect of generating methods which take structure arguments (for NeXT). This probably needs to be merged with the SetFunctionAttributes code in CodeGenModule.cpp llvm-svn: 55223
* Move all Obj-C runtime interaction into CodeGenFunction.Daniel Dunbar2008-08-201-40/+4
| | | | | | | - Drop duplicate (and broken) code for sending messages. - Add EmitObjCProtocolExpr to CodeGenFunction. llvm-svn: 55024
* Add CodeGen support for AddrLabelExpr in initializers.Daniel Dunbar2008-08-161-4/+5
| | | | llvm-svn: 54837
* Change WarnUnsupported to ErrorUnsupported (in name and in practice).Daniel Dunbar2008-08-161-1/+1
| | | | | | | - We are beyond the point where this shows up often and when it does generating miscompiled files is bad. llvm-svn: 54836
OpenPOWER on IntegriCloud