summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCall.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* insert a bitcast in the 'expand' case of argument passing when needed. ThisChris Lattner2011-07-121-28/+38
| | | | | | fixes the -m32 build of oggenc. llvm-svn: 134971
* fix PR10335 by watching out for IR type compatibility in call argument lists.Chris Lattner2011-07-121-1/+5
| | | | llvm-svn: 134966
* add some aggressive assertions that call arguments match up to calleeChris Lattner2011-07-121-3/+40
| | | | | | expectations in EmitCall. Next patch will take this further. llvm-svn: 134962
* how about we initialize RecursionState.Chris Lattner2011-07-101-2/+1
| | | | llvm-svn: 134855
* Rename CGT::VerifyFuncTypeComplete to isFuncTypeConvertible sinceChris Lattner2011-07-101-10/+9
| | | | | | | | | | | | | | | | | | it is a predicate, not an action. Change the return type to be a bool, not the incomplete member. Enhace it to detect the recursive compilation case, allowing us to compile Eli's testcase on llvmdev: struct T { struct T (*p)(void); } t; into: %struct.T = type { {}* } @t = common global %struct.T zeroinitializer, align 8 llvm-svn: 134853
* clang side to match the LLVM IR type system rewrite patch.Chris Lattner2011-07-091-38/+26
| | | | llvm-svn: 134831
* LValue carries a type now, so simplify the main EmitLoad/Store APIsJohn McCall2011-06-251-5/+4
| | | | | | by removing the redundant type parameter. llvm-svn: 133860
* Automatic Reference Counting.John McCall2011-06-151-10/+264
| | | | | | | | | | Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. llvm-svn: 133103
* Per Chris's suggestion, simplify code using llvm::getOrEnforceKnownAlignment.Eli Friedman2011-06-151-36/+15
| | | | llvm-svn: 133095
* Fix a regression from r132957 involving complex integers. (Fixes failures ↵Eli Friedman2011-06-151-2/+6
| | | | | | on gcc-testsuite bot.) llvm-svn: 133069
* The LLVM IR representation of byval arguments has a rather strange property: ↵Eli Friedman2011-06-141-5/+44
| | | | | | | | | | if the alignment of an argument to a call is less than the specified byval alignment for that argument, there is no way to specify the alignment of the implied copy. Therefore, we must ensure that the alignment of the argument is at least the byval alignment. To do this, we have to mess with the alignment of relevant alloca's in some cases, and insert a copy that conceptually shouldn't be necessary in some cases. This patch tries relatively hard to avoid creating an extra copy if it can be avoided (see test3 in the included testcase), but it is not possible to avoid in some cases (like test2 in the included testcase). rdar://9483886 llvm-svn: 132957
* Skip extra copy from aggregate where it isn't necessary; ↵Eli Friedman2011-05-261-0/+13
| | | | | | | | rdar://problem/8139919 . This shouldn't make much of a difference at -O3, but should substantially reduce the number of generated memcpy's at -O0. Originally r130717, but was backed out due to an ObjC regression. llvm-svn: 132102
* Introduce Type::isSignedIntegerOrEnumerationType() andDouglas Gregor2011-05-201-2/+2
| | | | | | | | | | | | | Type::isUnsignedIntegerOrEnumerationType(), which are like Type::isSignedIntegerType() and Type::isUnsignedIntegerType() but also consider the underlying type of a C++0x scoped enumeration type. Audited all callers to the existing functions, switching those that need to also handle scoped enumeration types (e.g., those that deal with constant values) over to the new functions. Fixes PR9923 / <rdar://problem/9447851>. llvm-svn: 131735
* For calls returning first-class aggregates, store by element instead of ↵Eli Friedman2011-05-171-2/+25
| | | | | | creating aggregate stores in common cases. This is more friendly to fast-isel. llvm-svn: 131490
* More killing of std::vector.John McCall2011-05-151-38/+38
| | | | llvm-svn: 131374
* Revert r130717, which caused a regression (<rdar://problem/9402621>).Douglas Gregor2011-05-071-13/+0
| | | | llvm-svn: 131057
* Skip extra copy from aggregate where it isn't necessary; ↵Eli Friedman2011-05-021-0/+13
| | | | | | rdar://problem/8139919 . This shouldn't make much of a difference at -O3, but should substantially reduce the number of generated memcpy's at -O0. llvm-svn: 130717
* Switch CallArgList from an std::pair to a new CallArg struct (which will ↵Eli Friedman2011-05-021-10/+9
| | | | | | eventually gain more members). Working towards modifying call emission to avoid unnecessary copies. llvm-svn: 130700
* Implement ARM pcs attribute. Basically it's another way of calling ↵Anton Korobeynikov2011-04-141-0/+5
| | | | | | | | | | convention selection (AAPCS or AAPCS+VFP), similar to fastcall / stdcall / whatevercall seen on x86. In particular, all library functions should always be AAPCS regardless of floating point ABI used. llvm-svn: 129534
* PR8369: make __attribute((regparm(0))) work correctly. Original patch byEli Friedman2011-04-091-5/+8
| | | | | | pageexec@freemail.hu, tweaks by me. llvm-svn: 129206
* Add support for language-specific address spaces. On top of that,Peter Collingbourne2011-03-181-1/+2
| | | | | | | | | add support for the OpenCL __private, __local, __constant and __global address spaces, as well as the __read_only, _read_write and __write_only image access specifiers. Patch originally by ARM; language-specific address space support by myself. llvm-svn: 127915
* Instead of storing an ASTContext* in FunctionProtoTypes with computed ↵Sebastian Redl2011-03-131-1/+1
| | | | | | noexcept specifiers, unique FunctionProtoTypes with a ContextualFoldingSet, as suggested by John McCall. llvm-svn: 127568
* Propagate the new exception information to FunctionProtoType.Sebastian Redl2011-03-121-1/+1
| | | | | | | | Change the interface to expose the new information and deal with the enormous fallout. Introduce the new ExceptionSpecificationType value EST_DynamicNone to more easily deal with empty throw specifications. Update the tests for noexcept and fix the various bugs uncovered, such as lack of tentative parsing support. llvm-svn: 127537
* Use a slightly more semantic interface for emitting call arguments.John McCall2011-03-111-17/+23
| | | | llvm-svn: 127494
* 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
* Use the "undergoes default argument promotion" bit on parameters toJohn McCall2011-03-091-17/+38
| | | | | | | | | | 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
* Encode argument numbering in debug info so that code generator can emit them ↵Devang Patel2011-03-031-8/+10
| | | | | | | | in order. This fixes few blocks.exp regressions. llvm-svn: 126960
* Revert "Add CC_Win64ThisCall and set it in the necessary places."Tilmann Scheller2011-03-021-21/+8
| | | | | | This reverts commit 126863. llvm-svn: 126886
* revert r126858.Devang Patel2011-03-021-10/+8
| | | | llvm-svn: 126874
* Add CC_Win64ThisCall and set it in the necessary places.Tilmann Scheller2011-03-021-8/+21
| | | | llvm-svn: 126863
* Encode argument numbering in debug info so that code generator can emit them ↵Devang Patel2011-03-021-8/+10
| | | | | | | | | | 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-021-10/+8
| | | | llvm-svn: 126848
* Encode argument numbering in debug info so that code generator can emit them ↵Devang Patel2011-03-011-8/+10
| | | | | | | | in order. This fixes few blocks.exp regressions. llvm-svn: 126795
* objc IRGen for Next runtime message API.Fariborz Jahanian2011-03-011-1/+2
| | | | | | | | | | 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
* Simplify test to check an aggregate argument that has non trivial ↵Devang Patel2011-02-161-1/+1
| | | | | | | | constructor or destructor. This patch rewrites r125142. llvm-svn: 125632
* Fix family-friendly-o, tsk tsk.Daniel Dunbar2011-02-101-1/+1
| | | | llvm-svn: 125293
* Driver/Frontend: Wire up -mregparm=.Daniel Dunbar2011-02-091-3/+3
| | | | llvm-svn: 125201
* If an aggregate argument is passed indirectly because it has non trivialDevang Patel2011-02-091-1/+1
| | | | | | | | destructor or copy constructor than let debug info know about it. Radar 8945514. llvm-svn: 125142
* Reorganize CodeGen{Function,Module} to eliminate the unfortunateJohn McCall2011-02-081-1/+1
| | | | | | | | Block{Function,Module} base class. Minor other refactorings. Fixed a few address-space bugs while I was there. llvm-svn: 125085
* Replace calls to getTypeSize() and getTypeAlign() with their 'InChars' Ken Dyck2011-01-191-4/+5
| | | | | | counterparts where char units are needed. llvm-svn: 123805
* Simplify mem{cpy, move, set} creation with IRBuilder.Benjamin Kramer2010-12-301-8/+6
| | | | llvm-svn: 122634
* Fix Whitespace.Michael J. Spencer2010-10-191-60/+60
| | | | llvm-svn: 116798
* IRgen/ABI: Add support for realigning structures which are passed by indirectDaniel Dunbar2010-09-161-2/+22
| | | | | | reference. llvm-svn: 114114
* Add symantic support for the Pascal calling convention viaDawn Perchik2010-09-031-0/+4
| | | | | | | "__attribute((pascal))" or "__pascal" (and "_pascal" under -fborland-extensions). Support still needs to be added to llvm. llvm-svn: 112939
* Re-commit r112916 with an additional fix for the self-host failures.John McCall2010-09-031-0/+3
| | | | | | I've audited the remaining getFunctionInfo call sites. llvm-svn: 112936
* Revert r112916, it's breaking selfhost pretty badly.John McCall2010-09-031-3/+0
| | | | llvm-svn: 112925
* It's not safe to use the generic CXXMethodDecl overload of CGT::getFunctionInfoJohn McCall2010-09-031-0/+3
| | | | | | | to set up a destructor call, because ABIs can tweak these conventions. Fixes rdar://problem/8386802. llvm-svn: 112916
* Teach IR generation to return 'this' from constructors and destructorsJohn McCall2010-08-311-18/+28
| | | | | | under the ARM ABI. llvm-svn: 112588
* IRgen: Switch more MakeAddr() users to MakeAddrLValue; this time for calls ↵Daniel Dunbar2010-08-211-2/+1
| | | | | | which were previously not computing the qualifier list. In most cases, I don't think it matters, but I believe this is conservatively more correct / consistent. llvm-svn: 111717
* IRgen: Change Emit{Load,Store}OfScalar to take a required Alignment argument andDaniel Dunbar2010-08-211-11/+23
| | | | | | | | update callers as best I can. - This is a work in progress, our alignment handling is very horrible / sketchy -- I am just aiming for monotonic improvement. - Serious review appreciated. llvm-svn: 111707
OpenPOWER on IntegriCloud