summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
Commit message (Collapse)AuthorAge
...
* Honor ByVal alignment. Patch by Nate Begeman!Daniel Dunbar2009-02-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63811 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak CGFunctionInfo::Profile method and reenable caching of ABIDaniel Dunbar2009-02-05
| | | | | | | information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63799 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ABIArgInfo::dump()Daniel Dunbar2009-02-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63794 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily disable caching of ABI results; this is going horriblyDaniel Dunbar2009-02-04
| | | | | | | wrong in some cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63780 91177308-0d34-0410-b5e6-96231b3b80d8
* Add asserts that the function signature matches the other arguments provideDaniel Dunbar2009-02-04
| | | | | | | to CGCall functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63775 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle demotion of coerced arguments (as in void a(x) short x; { ... }).Daniel Dunbar2009-02-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63726 91177308-0d34-0410-b5e6-96231b3b80d8
* Use ConvertTypeForMem when creating alloca for scalar argument.Daniel Dunbar2009-02-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63681 91177308-0d34-0410-b5e6-96231b3b80d8
* x86_64 ABI: Initial implementation of ABI compliant parameter passing.Daniel Dunbar2009-02-03
| | | | | | | | | | | | - Now only 27/500 failures on ABITest single argument tests; from 350/500. :) - As with return types, a large percentage of these are likely to be gcc bugs, not yet reviewed. Also, fix bug in handling of Ignore ABI type in argument lists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63654 91177308-0d34-0410-b5e6-96231b3b80d8
* ABI handling: Implement coercion for argument types (in addition toDaniel Dunbar2009-02-03
| | | | | | | return types). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63645 91177308-0d34-0410-b5e6-96231b3b80d8
* Change ABIInfo to compute information for a full signature at a timeDaniel Dunbar2009-02-03
| | | | | | | (the main point of this restructing). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63619 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove ABIArgInfo::Default kind, ABI is now responsible for specifyingDaniel Dunbar2009-02-03
| | | | | | | acceptable kind with more precise semantics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63617 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ABIArgInfo::Direct kind, which passes arguments using whatever theDaniel Dunbar2009-02-03
| | | | | | | | native IRgen type is. This is like Default, but without any extra semantics (like automatic tweaking of structures or void). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63615 91177308-0d34-0410-b5e6-96231b3b80d8
* Add two FIXMEs.Daniel Dunbar2009-02-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63613 91177308-0d34-0410-b5e6-96231b3b80d8
* Always use CGFunctionInfo to access ABI information.Daniel Dunbar2009-02-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63612 91177308-0d34-0410-b5e6-96231b3b80d8
* Move ABIArgInfo into CGFunctionInfo, computed on creation.Daniel Dunbar2009-02-03
| | | | | | | - Still have to convert some consumers over. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63610 91177308-0d34-0410-b5e6-96231b3b80d8
* Move ABIInfo/ABIArgInfo classes into ABIInfo.hDaniel Dunbar2009-02-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63586 91177308-0d34-0410-b5e6-96231b3b80d8
* Memoize CGFunctionInfo construction.Daniel Dunbar2009-02-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63576 91177308-0d34-0410-b5e6-96231b3b80d8
* Change CGFunctionInfo args iterator to not include the return type.Daniel Dunbar2009-02-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63571 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread CGFunctionInfo construction through CodeGenTypes.Daniel Dunbar2009-02-02
| | | | | | | - Inefficient & leaks memory currently, will be cleaned up subsequently. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63567 91177308-0d34-0410-b5e6-96231b3b80d8
* More ABI API cleanup.Daniel Dunbar2009-02-02
| | | | | | | | - Lift CGFunctionInfo creation above ReturnTypeUsesSret and EmitFunction{Epi,Pro}log. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63553 91177308-0d34-0410-b5e6-96231b3b80d8
* ABI handling API changes.Daniel Dunbar2009-02-02
| | | | | | | | | | | | - Lift CGFunctionInfo creation up to callers of EmitCall. - Move isVariadic bit out of CGFunctionInfo, take as argument to GetFunctionType instead. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63550 91177308-0d34-0410-b5e6-96231b3b80d8
* Shuffle some functions around, no functionality change.Daniel Dunbar2009-02-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63538 91177308-0d34-0410-b5e6-96231b3b80d8
* Add FIXME.Daniel Dunbar2009-02-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63531 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused overload of GetFunctionType.Daniel Dunbar2009-01-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63472 91177308-0d34-0410-b5e6-96231b3b80d8
* Initialize CGFunctionInfo isVariadic bit correctly.Daniel Dunbar2009-01-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63471 91177308-0d34-0410-b5e6-96231b3b80d8
* Err, unbreak my previous "no functionality change commit", will fix properly ↵Daniel Dunbar2009-01-31
| | | | | | later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63467 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill off CGCallInfo, always use CGFunctionInfo for encapsulatingDaniel Dunbar2009-01-31
| | | | | | | function/call info. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63466 91177308-0d34-0410-b5e6-96231b3b80d8
* x86_64 ABI: Retool classification to compute lo & hi classificationsDaniel Dunbar2009-01-31
| | | | | | | | | in terms of where the type resides in the containing object. This is a more clear embodiement of the spec & fixes a merging issue with unions. Down to 3/1000 failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63455 91177308-0d34-0410-b5e6-96231b3b80d8
* x86_64 ABI: Fix more thinkos, straddling computation for complex wasDaniel Dunbar2009-01-30
| | | | | | | | computing in bytes not bits. We are now down to 22/1000 failures on the return types tests, and 18 of those are gcc bugs I believe. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63438 91177308-0d34-0410-b5e6-96231b3b80d8
* x86_64 ABI: Fix thinko in prev commit, 64-bit vectors should have SSEDaniel Dunbar2009-01-30
| | | | | | | class, not integer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63426 91177308-0d34-0410-b5e6-96231b3b80d8
* x86_64 ABI: Pass <1 x double> in memory. This is arguably wrong, butDaniel Dunbar2009-01-30
| | | | | | | matches gcc 4.2 (not llvm-gcc). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63413 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove testing -use-x86_64-abi option; current implementation isDaniel Dunbar2009-01-30
| | | | | | | robust enough for general use. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63406 91177308-0d34-0410-b5e6-96231b3b80d8
* x86_64 ABI: Split small vectors which cross an eightbyte boundary. Down to ↵Daniel Dunbar2009-01-30
| | | | | | 33/500 return type failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63404 91177308-0d34-0410-b5e6-96231b3b80d8
* x86_64 ABI: Implement classification for arrays.Daniel Dunbar2009-01-30
| | | | | | | | - This brings us down to an 8% failure rate on the first 500 return types tests (from 12%). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63383 91177308-0d34-0410-b5e6-96231b3b80d8
* Use uint64_t not unsigned for type sizes/offsets.Daniel Dunbar2009-01-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63352 91177308-0d34-0410-b5e6-96231b3b80d8
* x86_64 ABI: Handle fields / complex components which straddleDaniel Dunbar2009-01-29
| | | | | | | | | eightbyte boundaries. - Getting harder to test now that we handle cases gcc & llvm-gcc get wrong ( { _Complex char; _Complex int; } is a good example). :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63305 91177308-0d34-0410-b5e6-96231b3b80d8
* x86_64 ABI: Tweak merging algorithm so that we always bail early whenDaniel Dunbar2009-01-29
| | | | | | | we see a Memory classification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63295 91177308-0d34-0410-b5e6-96231b3b80d8
* ABI: When emitting calls which return an ignored argument, make sureDaniel Dunbar2009-01-29
| | | | | | | to still return an RValue of the correct type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63294 91177308-0d34-0410-b5e6-96231b3b80d8
* x86_64 ABI: Implement classification for records.Daniel Dunbar2009-01-29
| | | | | | | | - This is my best initial guess at what the "spec" means, although it is not particularly clear on a number of points. Will refine through testing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63292 91177308-0d34-0410-b5e6-96231b3b80d8
* x86_64: Support cases which map to returning multiple values in LLVMDaniel Dunbar2009-01-29
| | | | | | | (e.g., _Complex double -> { double, double } return). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63285 91177308-0d34-0410-b5e6-96231b3b80d8
* x86_64 ABI: Classify _Complex ints as integer.Daniel Dunbar2009-01-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63283 91177308-0d34-0410-b5e6-96231b3b80d8
* x86_64: Classify __m64 and __m128 "correctly".Daniel Dunbar2009-01-27
| | | | | | | | - gcc appears to be classifying <1 x double> as INTEGER which is odd. Will investigate later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63086 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement support for coercion to wider types during ABI handling.Daniel Dunbar2009-01-27
| | | | | | | - Code quality is poor, but simple. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63083 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Ignore ABIArgInfo kind, for handling void & empty structures.Daniel Dunbar2009-01-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63039 91177308-0d34-0410-b5e6-96231b3b80d8
* Start filling in x86_64 ABI implementation.Daniel Dunbar2009-01-24
| | | | | | | | - No functionality change, moved behind -use-x86_64-abi option until it becomes non-experimental. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62915 91177308-0d34-0410-b5e6-96231b3b80d8
* Add dummy X86_64 ABIInfo implementation.Daniel Dunbar2009-01-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62268 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide a new kind of iterator, the specific_decl_iterator, thatDouglas Gregor2009-01-09
| | | | | | | | | | | filters the decls seen by decl_iterator with two criteria: the dynamic type of the declaration and a run-time predicate described by a member function. This simplifies EnumDecl, RecordDecl, and ObjCContainerDecl considerably. It has no measurable performance impact. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61994 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow ABI to use StructRet even for scalar values.Daniel Dunbar2008-12-18
| | | | | | | | | | | - Update comment to reflect fact that StructRet is now supported for any type (modulo LLVM support). - No functionality change, no scalar types currently use this feature. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61192 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle returning complex types that get coerced. Fixes PR3131Anders Carlsson2008-11-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60058 91177308-0d34-0410-b5e6-96231b3b80d8
* Migrate some stuff from NamedDecl::getName() to Chris Lattner2008-11-24
| | | | | | | NamedDecl::getNameAsString() to make it more explicit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59937 91177308-0d34-0410-b5e6-96231b3b80d8