summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprScalar.cpp
Commit message (Collapse)AuthorAge
...
* reimplement vector comparisons as [fi]cmp+sext instead of using v[if]cmp.Chris Lattner2009-07-08
| | | | | | | | | Also, enable them in sema so that they are tested, and now that the x86 backend has stablized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74983 91177308-0d34-0410-b5e6-96231b3b80d8
* Update clang for the add ->add/fadd split. Likewise for sub and mul.Chris Lattner2009-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73604 91177308-0d34-0410-b5e6-96231b3b80d8
* Use PushConditionalTempDestruction/PopConditionalTempDestruction for the ↵Anders Carlsson2009-06-04
| | | | | | ternary operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72842 91177308-0d34-0410-b5e6-96231b3b80d8
* Use conditional temp destruction for || and &&.Anders Carlsson2009-06-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72838 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new function for emitting new functions.Anders Carlsson2009-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72656 91177308-0d34-0410-b5e6-96231b3b80d8
* Call EmitCXXExprWithTemporaries.Anders Carlsson2009-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72652 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixup the rest of the trivial cases of the codegen of volatile. IfMike Stump2009-05-29
| | | | | | | | any body can spot codegen bugs with volatile, or knows of any in the bug database, let me know. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72572 91177308-0d34-0410-b5e6-96231b3b80d8
* Functions that return references can be rvalues as well.Anders Carlsson2009-05-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72457 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixup codegen for __block int i; i += rhs();. Should also slightlyMike Stump2009-05-22
| | | | | | | improve codegen in some cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72273 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixup blocks codegen for { __block i; i = rhs(); }, we want the rhsMike Stump2009-05-21
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72226 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't always zext the result of the not unary operator to an int.Anders Carlsson2009-05-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72117 91177308-0d34-0410-b5e6-96231b3b80d8
* Have AggExprEmitter::VisitCXXConstructExpr make new variables if necessary. ↵Anders Carlsson2009-05-19
| | | | | | Stub out VisitCXXExprWithTemporaries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72103 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix pointer addressing and array subscripting of Objective-C interfaceDaniel Dunbar2009-04-25
| | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70009 91177308-0d34-0410-b5e6-96231b3b80d8
* Clang part of r69947. Reverting back 69574 as it is no longer needed.Sanjiv Gupta2009-04-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69949 91177308-0d34-0410-b5e6-96231b3b80d8
* PR3247: Handle a couple of cases where we weren't emitting VLA sizes (and Eli Friedman2009-04-20
| | | | | | | | subsequently crashed). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69567 91177308-0d34-0410-b5e6-96231b3b80d8
* PR3248: Make sure the evaluate the operand of a sizeof when it has a VLA type.Eli Friedman2009-04-20
| | | | | | | | Adapted from patch by Tim Northover. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69566 91177308-0d34-0410-b5e6-96231b3b80d8
* Support code generation of 'this' exprsAnders Carlsson2009-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69050 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure value is initialized when built w/o asserts.Daniel Dunbar2009-04-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68615 91177308-0d34-0410-b5e6-96231b3b80d8
* Pointer width on targets like PIC16 is 16-bit, while the valid index size to ↵Sanjiv Gupta2009-04-08
| | | | | | GEP is only 32 or 64. So promote index to 32 in such cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68590 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove -ftrapu.Mike Stump2009-04-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68330 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixup -ftrapv to be more gcc compatible. -ftrapu (for want of aMike Stump2009-04-02
| | | | | | | | | | | better name) is the option that SmallTalk can use to intercept all overflows, including unsigned. I added some testcases so we don't break anything. Also included is another patch from David for += and friends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68267 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -ftrapv support, patch from David Chisnall; well all except theMike Stump2009-04-01
| | | | | | | clang option code that is and two bug fixes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68240 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r68221, -ftrapv support, which causes several regressions inDouglas Gregor2009-04-01
| | | | | | | Clang's test suite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68230 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -ftrapv support, patch from David Chisnall; well all except theMike Stump2009-04-01
| | | | | | | clang option code that is. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68221 91177308-0d34-0410-b5e6-96231b3b80d8
* Trivial cleanup.Eli Friedman2009-03-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67899 91177308-0d34-0410-b5e6-96231b3b80d8
* Misc small fixes/cleanups/comment changes.Eli Friedman2009-03-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67895 91177308-0d34-0410-b5e6-96231b3b80d8
* Change compound assignment operators to keep track of both the promoted Eli Friedman2009-03-28
| | | | | | | | | | | | | | | | | | | LHS type and the computation result type; this encodes information into the AST which is otherwise non-obvious. Fix Sema to always come up with the right answer for both of these types. Fix IRGen and the analyzer to account for these changes. This fixes PR2601. The approach is inspired by PR2601 comment 2. Note that this changes real *= complex in CodeGen from a silent miscompilation to an explicit error. I'm not really sure that the analyzer changes are correct, or how to test them... someone more familiar with the analyzer should check those changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67889 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a subtle bug in CodeGen for the increment of a bitfield.Eli Friedman2009-03-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67499 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR3809, codegen for inc/dec of function pointers.Chris Lattner2009-03-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67165 91177308-0d34-0410-b5e6-96231b3b80d8
* Almost complete implementation of rvalue references. One bug, and a few ↵Sebastian Redl2009-03-16
| | | | | | unclear areas. Maybe Doug can shed some light on some of the fixmes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67059 91177308-0d34-0410-b5e6-96231b3b80d8
* Back out the patch in r66302, and re-fix it properly. We assume for Eli Friedman2009-03-07
| | | | | | | | | | performance that the type of the returned llvm::Value for an expression matches the converted type of the clang::Expr; mismatches will cause all sorts of errors and silent miscompilations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66321 91177308-0d34-0410-b5e6-96231b3b80d8
* Codegen support for copy helpers for block literals.Mike Stump2009-03-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66319 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed a bug where generation of read-barriers causedFariborz Jahanian2009-03-06
| | | | | | | crash in ir-gen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66302 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanup for choose expressions: add a helper that returns the Eli Friedman2009-03-04
| | | | | | | | chosen sub-expression, rather than just evaluating the condition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66018 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempt to fix PR3709: when converting from an integer to a pointer, Eli Friedman2009-03-04
| | | | | | | | first extend the integer to the correct width. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66009 91177308-0d34-0410-b5e6-96231b3b80d8
* First cut CodeGen support for __block variables.Mike Stump2009-02-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65688 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the AST generated for offsetof a bit so that it looks like a Eli Friedman2009-02-27
| | | | | | | | | | normal expression, and change Evaluate and IRGen to evaluate it like a normal expression. This simplifies the code significantly, and fixes PR3396. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65622 91177308-0d34-0410-b5e6-96231b3b80d8
* CodeGen support for copied BlockDeclRefExprs.Mike Stump2009-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65487 91177308-0d34-0410-b5e6-96231b3b80d8
* first wave of fixes for @encode sema support. This is part of PR3648.Chris Lattner2009-02-24
| | | | | | | | The big difference here is that (like string literal) @encode has array type, not pointer type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65391 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanp code with some recent suggestions.Mike Stump2009-02-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65285 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CodeGen support for the helper for BlockDeclRefExprs. The easierMike Stump2009-02-21
| | | | | | | stuff is mostly done. Move BlockHasCopyDispose up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65242 91177308-0d34-0410-b5e6-96231b3b80d8
* More codegen for blocks. The type of block literals should be better.Mike Stump2009-02-19
| | | | | | | The size calculation is improved. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64994 91177308-0d34-0410-b5e6-96231b3b80d8
* rip out __builtin_overloadChris Lattner2009-02-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64961 91177308-0d34-0410-b5e6-96231b3b80d8
* Generate the helper function for blocks. Now basic codegen isMike Stump2009-02-14
| | | | | | starting to work for blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64570 91177308-0d34-0410-b5e6-96231b3b80d8
* fix rdar://6586493, a bug in codegen of the GNU Chris Lattner2009-02-13
| | | | | | | missing-?:-true-value extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64505 91177308-0d34-0410-b5e6-96231b3b80d8
* Condense all the blocks code into CGBlocks.cpp.Mike Stump2009-02-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64457 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial codegen for block literals. This is a work in progress. I'veMike Stump2009-02-12
| | | | | | | | | tried to put FIXMEs on the most important things to fix up. Lots left to do including more codegen, more documentation and cleaning code and style cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64390 91177308-0d34-0410-b5e6-96231b3b80d8
* Use EmitVAListRef instead of EmitLValue directly to handle array decayDaniel Dunbar2009-02-11
| | | | | | | case on x86_64. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64333 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix rdar://6518463, increment of a bool is always true, due toChris Lattner2009-02-11
| | | | | | | | subtle and non-obvious promotion rules. We already handle += and +1 correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64296 91177308-0d34-0410-b5e6-96231b3b80d8
* finish off codegen support for sub of pointer to functions, Chris Lattner2009-02-11
| | | | | | | finishing off rdar://6520707 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64295 91177308-0d34-0410-b5e6-96231b3b80d8