summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCall.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't assume that a block always has a FunctionProtoType. Fixes rdar://6768379.Anders Carlsson2009-04-081-13/+0
| | | | llvm-svn: 68583
* Add a getFunctionInfo that takes a BlockPointerType.Anders Carlsson2009-04-061-0/+13
| | | | llvm-svn: 68452
* Basic support for regparm codegenAnton Korobeynikov2009-04-041-3/+22
| | | | llvm-svn: 68414
* Add a getFunctionInfo that takes a CXXMethodDecl.Anders Carlsson2009-04-031-0/+17
| | | | llvm-svn: 68411
* x86-32 Darwin ABI: Handle small structures correctly.Daniel Dunbar2009-04-011-2/+68
| | | | | | | | | | | | | | - Small structures are returned in a register if: 1. They fit nicely in a register. 2. All fields fit nicely in a register. (more or less) - We now pass the first 5000 ABITests if unions are disabled. - <rdar://problem/6497882> [irgen] x86-32 ABI compatibility with small structs llvm-svn: 68197
* x86-32 Darwin ABI: Single element arrays can be part of "singleDaniel Dunbar2009-04-011-18/+26
| | | | | | | | | | element structures", which have different ABI rules. - Current return-arguments-32 status is: 1 out of 1000 failures (-7) - Also, vectors inside "single element structs" require special handling. llvm-svn: 68196
* x86-32 Darwin ABI: Handle direct return of vectors.Daniel Dunbar2009-04-011-0/+22
| | | | | | - Current return-arguments-32 status is: 8 out of 1000 failures (-7) llvm-svn: 68192
* x86_32 Darwin ABI: Treat empty unions like empty structures.Daniel Dunbar2009-03-311-5/+5
| | | | | | - Current return-arguments-32 status: 15/1000 failures llvm-svn: 68132
* Initial implementation of ARM ABI. Mostly untested. Note that I'm not Eli Friedman2009-03-291-0/+88
| | | | | | | | really intending to take ownership of this; I wrote this mostly because I was curious about how the ARM ABI works. It should be a decent start, though. llvm-svn: 67969
* Fix the ABI convention for struct returns on x86 outside of Darwin.Eli Friedman2009-03-231-1/+9
| | | | llvm-svn: 67577
* don't set the name of a call instruction to "call" in release-asserts Chris Lattner2009-03-221-10/+9
| | | | | | build. This shaves another 3% off. llvm-svn: 67460
* PR3835: Interaction with ABI structure passing can inhibitDaniel Dunbar2009-03-181-0/+6
| | | | | | readnone/readonly attributes. llvm-svn: 67224
* x86_32 ABI: Don't try and expand structures with bitfields.Daniel Dunbar2009-03-111-7/+7
| | | | | | | | | | - This is an ABI incompatiblity, but this is not likely to be a huge deal in practice. For now we at least generate self consistent code instead of crashing. - <rdar://problem/6657601> x86-32 ABI: Bitfields in small structures are not passed correctly llvm-svn: 66713
* Remove some now-unneeded calls to llvm::errs().flush().Daniel Dunbar2009-03-101-2/+0
| | | | llvm-svn: 66555
* x86_64 ABI: Handle long double in union when upper eightbyte resultsDaniel Dunbar2009-03-061-8/+16
| | | | | | | in a lone X87 class. - PR3735. llvm-svn: 66277
* Cleanup handling of function attributes in calls.Daniel Dunbar2009-03-021-35/+27
| | | | | | - No intended functionality change. llvm-svn: 65805
* Create a new TypeNodes.def file that enumerates all of the types,Douglas Gregor2009-02-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | giving them rough classifications (normal types, never-canonical types, always-dependent types, abstract type representations) and making it far easier to make sure that we've hit all of the cases when decoding types. Switched some switch() statements on the type class over to using this mechanism, and filtering out those things we don't care about. For example, CodeGen should never see always-dependent or non-canonical types, while debug info generation should never see always-dependent types. More switch() statements on the type class need to be moved over to using this approach, so that we'll get warnings when we add a new type then fail to account for it somewhere in the compiler. As part of this, some types have been renamed: TypeOfExpr -> TypeOfExprType FunctionTypeProto -> FunctionProtoType FunctionTypeNoProto -> FunctionNoProtoType There shouldn't be any functionality change... llvm-svn: 65591
* Add Type::hasPointerRepresentation predicate.Daniel Dunbar2009-02-261-3/+1
| | | | | | | | | - For types whose native representation is a pointer. - Use to replace ExprConstant.cpp:HasPointerEvalType, CodeGenFunction::isObjCPointerType. llvm-svn: 65569
* Drop uses of isPointerLikeType.Daniel Dunbar2009-02-261-2/+2
| | | | | | - No functionality change. llvm-svn: 65560
* Classify enum types correctlyAnders Carlsson2009-02-261-0/+3
| | | | llvm-svn: 65533
* x86_64 ABI: Qualified id types are passed as pointers.Daniel Dunbar2009-02-261-0/+1
| | | | | | - <rdar://problem/6622451> Bad x86_64 code gen for message call taking one argument. llvm-svn: 65510
* Temporarily disable clearing of insert point (to indicate unreachableDaniel Dunbar2009-02-251-0/+5
| | | | | | | code) when calling noreturn functions; general expression emission isn't ready to do the right thing in all cases. llvm-svn: 65473
* Add low level support for generating invoke instead of calls.Daniel Dunbar2009-02-231-15/+34
| | | | | | - No functionality change. llvm-svn: 65325
* x86_64 ABI: Actually, we can always pass things we want to pass inDaniel Dunbar2009-02-221-10/+2
| | | | | | | memory using Indirect; this was a holdover from when CGCall wasn't as robust. llvm-svn: 65278
* x86_64 ABI: Make sure to pass vectors that we want to pass in memoryDaniel Dunbar2009-02-221-1/+1
| | | | | | | | | as byval. Otherwise LLVM will have its own opinion about where to put things. We now pass all gcc dg.compat tests on x86_64. llvm-svn: 65266
* x86_64 ABI: Pass 32-bit vectors as Integer to match gcc. We don't careDaniel Dunbar2009-02-221-1/+16
| | | | | | about these much but <2 x i16> shows up in the gcc test suite. llvm-svn: 65264
* x86_64 ABI: Classify <1 x i64> as INTEGER (match gcc not llvm-gcc).Daniel Dunbar2009-02-221-6/+12
| | | | | | | Also, make sure to pass <1 x i64> as i64 (not <1 x i64>, which doesn't quite work yet in the backend). llvm-svn: 65262
* Take advantage of noreturn attribute to add unreachable instruction &Daniel Dunbar2009-02-201-0/+12
| | | | | | | clear insertion point. The rest of IRgen should theoretically take advantage of this to avoid emitting dead code. Theory != Practice. llvm-svn: 65141
* Set call attribute for direct calls (i.e. noreturn).Daniel Dunbar2009-02-201-3/+3
| | | | | | - Remove an unused variant of EmitCallExpr overload. llvm-svn: 65130
* switch ObjCMethodDecl's parameter list from being explicitly managed to an ↵Chris Lattner2009-02-201-1/+1
| | | | | | ObjCList. llvm-svn: 65114
* i386 ABI: Offset computation in va_arg was incorrect for sizeof(Ty)>4.Daniel Dunbar2009-02-181-6/+3
| | | | | | We are down to only failing gcc.dg/compat/vector-[12] (8 tests total). llvm-svn: 64967
* x86_64 ABI: Fix thinko in computation of bound for "passed in SSE regs" test.Daniel Dunbar2009-02-181-1/+1
| | | | | | Two more gcc/x86_64 failures down. llvm-svn: 64963
* x86_64 ABI: "is passed in regs" computation for va_arg was broken forDaniel Dunbar2009-02-181-1/+1
| | | | | | | | things passed in mixed registers. This knocks out 8 x86_64 failures. llvm-svn: 64958
* x86_64 ABI: Two bug fixes.Daniel Dunbar2009-02-181-4/+36
| | | | | | | | | | | | | | | | | | 1. Return of _Complex long double used wrong type. 2. va_arg of types passed in two SSE registers didn't account for extra space in register save area. Down to 18 failures on gcc/compat/x86_64. Combined 32/64 results are: -- === gcc Summary === # of expected passes 1292 # of unexpected failures 34 # of unsupported tests 2 -- llvm-svn: 64880
* x86_64 ABI: Fix assert on return of _Complex long double.Daniel Dunbar2009-02-171-5/+6
| | | | llvm-svn: 64756
* x86_64 ABI: Implement classification for bit-fields.Daniel Dunbar2009-02-171-2/+26
| | | | llvm-svn: 64727
* x86_64 ABI: Handle va_arg arguments with alignment > 8.Daniel Dunbar2009-02-161-4/+15
| | | | llvm-svn: 64701
* x86_64 ABI: Need to use canonical types when comparing againstDaniel Dunbar2009-02-141-2/+6
| | | | | | ASTContext types. llvm-svn: 64533
* x86_64 ABI: Pass simple types directly when possible. This isDaniel Dunbar2009-02-141-2/+32
| | | | | | | important for both keeping the generated LLVM simple and for ensuring that integer types are passed/promoted correctly. llvm-svn: 64529
* x86_64 ABI: Support va_arg passed in mixed registers.Daniel Dunbar2009-02-131-1/+22
| | | | | | - Now at 1274 passes on gcc compat suite vs 1262. llvm-svn: 64469
* x86_64: Initial varargs support.Daniel Dunbar2009-02-121-1/+153
| | | | | | | | | | | | | | | | | | | | | | | | | - Doesn't yet handle case where values are passed in mixed (general purpose & floating point) registers; otherwise largely functional. Code still needs some cleaning. Fixes: MultiSource/Applications/lua/lua MultiSource/Applications/siod/siod MultiSource/Applications/sqlite3/sqlite3 SingleSource/Regression/C/PR640 SingleSource/UnitTests/2003-07-09-SignedArgs SingleSource/UnitTests/2007-03-02-VaCopy gcc compat test suite results (Darwin x86-32 & -64): -- # of expected passes 1262 # of unexpected failures 56 # of unresolved testcases 34 # of unsupported tests 2 Compare to: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090209/012050.html llvm-svn: 64370
* Pull CodeGenFunction::EmitVAArg into target specific ABIInfo classes.Daniel Dunbar2009-02-101-3/+55
| | | | llvm-svn: 64235
* Tweak x86-64 ABI to allow reuse for vararg handling.Daniel Dunbar2009-02-101-22/+26
| | | | llvm-svn: 64221
* ABI: Correctly handle load/store of values which have a different LLVMDaniel Dunbar2009-02-101-21/+22
| | | | | | | | | memory representation (e.g., bool). - This upgrades (downgrades) MultiSource/Applications/ClamAV/clamscan to a miscompile and fixes SingleSource/UnitTests/2003-05-31-CastToBool. llvm-svn: 64194
* Make sure to initialize local variables, even if they were ignored byDaniel Dunbar2009-02-101-0/+7
| | | | | | ABI. llvm-svn: 64187
* Set load/store alignment when doing ABI coercions.Daniel Dunbar2009-02-071-4/+14
| | | | | | | | | | | | - Currently, this is producing poor code, but we prefer correctness to performance for now. Eventually we should be able to generally avoid having to set the alignment when we control the alignment of the alloca. - This knocks out 33/1000 failures on my single argument ABI tests, down to 22/1000 and 18 of these appear to be gcc bugs. Woot. llvm-svn: 64001
* Implement Direct ABIInfo semantics.Daniel Dunbar2009-02-051-17/+29
| | | | | | | | - No intended functionality change, this is essentially enabling direct passing of complex and aggregate values, which no ABI is using. llvm-svn: 63863
* Simplify test for whether we need an alloca to hold an indirect returnDaniel Dunbar2009-02-051-11/+1
| | | | | | | value. - No functionality change. llvm-svn: 63859
* Implement ABI Indirect sematics for arguments.Daniel Dunbar2009-02-051-6/+32
| | | | | | | | - No intended functionality change, all current ABI implementations were only using indirect for complex/aggregate types, which were being passed indirectly with the Direct ABIInfo kind. llvm-svn: 63858
* Merge ABIInfo StructRet/ByVal into Indirect. Daniel Dunbar2009-02-051-46/+30
| | | | | | - No (intended) functionality change, the semantic changes are to come. llvm-svn: 63850
OpenPOWER on IntegriCloud