summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Use a slightly more semantic interface for emitting call arguments.John McCall2011-03-116-47/+40
| | | | llvm-svn: 127494
* Add support for the OpenCL vec_step operator, by generalising andPeter Collingbourne2011-03-111-4/+5
| | | | | | | extending the existing support for sizeof and alignof. Original patch by Guy Benyei. llvm-svn: 127475
* Convert the RecordSize parameter of AppendTailPadding() to CharUnits toKen Dyck2011-03-111-8/+6
| | | | | | | avoid converting to bits and back again. No change in functionality intended. llvm-svn: 127455
* lib/CodeGen/CGCall.cpp: Don't invoke multiple Builder.CreateBitCast() on ↵NAKAMURA Takumi2011-03-101-2/+4
| | | | | | Builder.CreateMemCpy. Or we would see sideeffect incompatibility among gcc and clang. llvm-svn: 127405
* Fixed InnerLocStart.Abramo Bagnara2011-03-091-2/+2
| | | | llvm-svn: 127330
* Remove a rather egregious use of getFunctionInfo.John McCall2011-03-092-22/+13
| | | | llvm-svn: 127324
* Fix three of the four places where I left breadcrumbs to avoid unnecessaryJohn McCall2011-03-093-55/+64
| | | | | | recomputation. llvm-svn: 127322
* Tame this assert, hopefully fixing self-host.John McCall2011-03-091-1/+20
| | | | llvm-svn: 127319
* Use the "undergoes default argument promotion" bit on parameters toJohn McCall2011-03-0915-129/+151
| | | | | | | | | | simplify the logic of initializing function parameters so that we don't need both a variable declaration and a type in FunctionArgList. This also means that we need to propagate the CGFunctionInfo down in a lot of places rather than recalculating it from the FAL. There's more we can do to eliminate redundancy here, and I've left FIXMEs behind to do it. llvm-svn: 127314
* Emit block capture initializers as if they were normal initializers for a localJohn McCall2011-03-081-1/+3
| | | | | | variable that just happens to be stored in a wierd place. llvm-svn: 127235
* Extract a function to emit an arbitrary expression as if it were the initializerJohn McCall2011-03-082-54/+84
| | | | | | for a local variable. llvm-svn: 127227
* Fixed source range for all DeclaratorDecl's.Abramo Bagnara2011-03-082-4/+8
| | | | llvm-svn: 127225
* When we adjust the inline ASM type, we need to take into account an earlyBill Wendling2011-03-071-1/+1
| | | | | | | | clobber with the 'y' constraint. Otherwise, we get the wrong return type and an assert, because it created a '<1 x i64>' vector type instead of the x86_mmx type. llvm-svn: 127185
* CodeGenFunction::GenerateBlockFunction() should initialize DebugInfo just ↵Devang Patel2011-03-071-1/+4
| | | | | | like CodeGenFunction::GenerateCode() llvm-svn: 127174
* DebugInfo can be enabled or disabled at function level (e.g. using an ↵Devang Patel2011-03-078-20/+21
| | | | | | attribute). However, at module level it is determined by command line option and the state of command line option does not change during compilation. Make this layering explicit and fix accidental cases where the code generator was checking whether module has debug info enabled instead of checking whether debug info is enabled for this function or not. llvm-svn: 127165
* Do not emit stop point for CXXDefaultArgExpr. It results in suboptimial user ↵Devang Patel2011-03-074-4/+17
| | | | | | | | | | | | | experience. 21 int main() { 22 A a; For example, here user would expect to stop at line 22, even if A's constructor leads to a call through CXXDefaultArgExpr. This fixes ostream-defined.exp regression from gdb testsuite. llvm-svn: 127164
* The conditional needs to be pushed before the branch. Make the test lessJohn McCall2011-03-071-78/+81
| | | | | | trivial to check this. Adjust for style. llvm-svn: 127151
* An operator new with an empty exception specifier returns null on a badJohn McCall2011-03-071-0/+8
| | | | | | | | allocation and therefore requires a null-check. We were doing that, but we weren't treating the new-initializer as being conditionally executed, which means it was possible to get ill-formed IR as in PR9298. llvm-svn: 127147
* Revert r126422 "Use private linkage to avoid symbol conflicts inDouglas Gregor2011-03-061-1/+1
| | | | | | corner cases like the one in PR9301." which caused PR9416. llvm-svn: 127136
* Correctly unwrap 'auto' types. Fixes PR9414.Anders Carlsson2011-03-061-0/+3
| | | | llvm-svn: 127121
* StringRefify.Benjamin Kramer2011-03-052-9/+10
| | | | llvm-svn: 127082
* Initialize variable.Bill Wendling2011-03-041-2/+2
| | | | llvm-svn: 127039
* Emit a stop point before a call expression so that debugger has some chance ↵Devang Patel2011-03-041-0/+7
| | | | | | | | | | of getting some footing when user wants to stop at 2nd bar() in following expression when all function calls are inlined. = bar() + ... + bar() + ... clang keeps track of column numbers, so we could put location entries for all subexpressions but that will significantly bloat debug info in general, but a location for call expression is helpful here. llvm-svn: 127018
* Access ivars with inbounds GEPs, even in -fwrapv. It's unlikely thatJohn McCall2011-03-041-1/+1
| | | | | | | this can have any optimization effect, given the opacity of objects pointers, but you never know. llvm-svn: 126990
* Let's do super message sends with static allocas instead of dynamic ones.John McCall2011-03-041-2/+2
| | | | llvm-svn: 126989
* Make AttributedTypes for GC-qualified types and fix some miscellaneousJohn McCall2011-03-041-0/+1
| | | | | | | bugs with such types. Not sure this is quite how I want the desugaring and a.k.a. logic to go, but it suffices. llvm-svn: 126986
* Encode argument numbering in debug info so that code generator can emit them ↵Devang Patel2011-03-035-20/+27
| | | | | | | | in order. This fixes few blocks.exp regressions. llvm-svn: 126960
* Fix a typo.Dan Gohman2011-03-021-1/+1
| | | | llvm-svn: 126890
* Revert "Add CC_Win64ThisCall and set it in the necessary places."Tilmann Scheller2011-03-0211-100/+39
| | | | | | This reverts commit 126863. llvm-svn: 126886
* Only emit string initializers in-place if types match. Fixes PR9373.Benjamin Kramer2011-03-021-1/+1
| | | | llvm-svn: 126883
* Revert "Add preliminary support for MSVC-style vtables."Tilmann Scheller2011-03-021-61/+2
| | | | | | This reverts commit 126865. llvm-svn: 126876
* revert r126858.Devang Patel2011-03-025-27/+20
| | | | llvm-svn: 126874
* IRGen. Fix IR when message returns reference type.Fariborz Jahanian2011-03-021-0/+3
| | | | | | // rdar://8604515. llvm-svn: 126869
* Add preliminary support for MSVC-style vtables.Tilmann Scheller2011-03-021-2/+61
| | | | llvm-svn: 126865
* Add CC_Win64ThisCall and set it in the necessary places.Tilmann Scheller2011-03-0211-39/+100
| | | | llvm-svn: 126863
* Encode argument numbering in debug info so that code generator can emit them ↵Devang Patel2011-03-025-20/+27
| | | | | | | | | | in order. This fixes few blocks.exp regressions. Reapply r126795 with a fix (one character change) for gdb testsuite regressions. llvm-svn: 126858
* Revert r126794.Devang Patel2011-03-025-27/+20
| | | | llvm-svn: 126848
* Hack in something so that we emit better debug information aboutJohn McCall2011-03-021-3/+17
| | | | | | captured __block variables in the block-literal type. llvm-svn: 126834
* PR9350: increment/decrement of char (and anything else narrower than int)Eli Friedman2011-03-021-3/+5
| | | | | | can't overflow due to promotion rules; emit a wrapping add for those cases. llvm-svn: 126816
* Encode argument numbering in debug info so that code generator can emit them ↵Devang Patel2011-03-015-20/+27
| | | | | | | | in order. This fixes few blocks.exp regressions. llvm-svn: 126795
* objc IRGen for Next runtime message API.Fariborz Jahanian2011-03-012-6/+10
| | | | | | | | | | The prototype for objc_msgSend() is technically variadic - `id objc_msgSend(id, SEL, ...)`. But all method calls should use a prototype that matches the method, not the prototype for objc_msgSend itself(). // rdar://9048030 llvm-svn: 126754
* -fwrapv should turn off the inbounds markers from geps used for pointerChris Lattner2011-03-012-36/+60
| | | | | | | arithmetic. This is part of PR9256, it would be great if someone else wired up -fno-strict-overflow in the driver to -fwrapv. llvm-svn: 126718
* Use single code path to handle c++ structs and classes while generating ↵Devang Patel2011-02-281-8/+6
| | | | | | debug info. llvm-svn: 126691
* Revert r126678.Fariborz Jahanian2011-02-281-13/+13
| | | | llvm-svn: 126685
* objc IRGen for Next runtime message API.Fariborz Jahanian2011-02-281-13/+13
| | | | | | | | | | The prototype for objc_msgSend() is technically variadic - `id objc_msgSend(id, SEL, ...)`. But all method calls should use a prototype that matches the method, not the prototype for objc_msgSend itself(). // rdar://9048030 llvm-svn: 126678
* Make skipping of vardecls more precise: it's ok to skip a decl if the entireChris Lattner2011-02-281-3/+18
| | | | | | compound stmt containing the decl is skipped. llvm-svn: 126639
* make switch constant folding a bit stronger, handling a missed case.Chris Lattner2011-02-281-3/+8
| | | | llvm-svn: 126638
* Add a -fcxx-exceptions flag to the frontend, which can be used to enableAnders Carlsson2011-02-281-2/+2
| | | | | | | | | | C++ exceptions, even when exceptions have been turned off using -fno-exceptions. Make the -fobjc-exceptions flag do the same thing, but for Objective-C exceptions. C++ and Objective-C exceptions can also be disabled using -fno-cxx-excptions and -fno-objc-exceptions. llvm-svn: 126630
* remove a bogus assertion, add a comment.Chris Lattner2011-02-281-3/+1
| | | | llvm-svn: 126603
* make switch condition constant folding much more aggressive, handling Chris Lattner2011-02-281-1/+68
| | | | | | | compound statements and break statements. This implements enough to handle PR9322 and rdar://6970405. llvm-svn: 126602
OpenPOWER on IntegriCloud