aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
AgeCommit message (Collapse)Author
2009-02-10Make sure to initialize local variables, even if they were ignored byDaniel Dunbar
ABI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64187 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07Set load/store alignment when doing ABI coercions.Daniel Dunbar
- 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64001 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05Implement Direct ABIInfo semantics.Daniel Dunbar
- No intended functionality change, this is essentially enabling direct passing of complex and aggregate values, which no ABI is using. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63863 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05Simplify test for whether we need an alloca to hold an indirect returnDaniel Dunbar
value. - No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63859 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05Implement ABI Indirect sematics for arguments.Daniel Dunbar
- 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63858 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05Merge ABIInfo StructRet/ByVal into Indirect. Daniel Dunbar
- No (intended) functionality change, the semantic changes are to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63850 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05Pull CodeGenFunction::GetUndefRValue() out of EmitUnsupportedRValue.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63845 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05x86-32: Use Ignore to avoid passing empty structs (instead of Expand).Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63813 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05Honor ByVal alignment. Patch by Nate Begeman!Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63811 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05Unbreak CGFunctionInfo::Profile method and reenable caching of ABIDaniel Dunbar
information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63799 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04Add ABIArgInfo::dump()Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63794 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04Temporarily disable caching of ABI results; this is going horriblyDaniel Dunbar
wrong in some cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63780 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04Add asserts that the function signature matches the other arguments provideDaniel Dunbar
to CGCall functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63775 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04Handle demotion of coerced arguments (as in void a(x) short x; { ... }).Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63726 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03Use ConvertTypeForMem when creating alloca for scalar argument.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63681 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03x86_64 ABI: Initial implementation of ABI compliant parameter passing.Daniel Dunbar
- 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
2009-02-03ABI handling: Implement coercion for argument types (in addition toDaniel Dunbar
return types). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63645 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03Change ABIInfo to compute information for a full signature at a timeDaniel Dunbar
(the main point of this restructing). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63619 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03Remove ABIArgInfo::Default kind, ABI is now responsible for specifyingDaniel Dunbar
acceptable kind with more precise semantics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63617 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03Add ABIArgInfo::Direct kind, which passes arguments using whatever theDaniel Dunbar
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
2009-02-03Add two FIXMEs.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63613 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03Always use CGFunctionInfo to access ABI information.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63612 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03Move ABIArgInfo into CGFunctionInfo, computed on creation.Daniel Dunbar
- Still have to convert some consumers over. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63610 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03Move ABIInfo/ABIArgInfo classes into ABIInfo.hDaniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63586 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03Memoize CGFunctionInfo construction.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63576 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02Change CGFunctionInfo args iterator to not include the return type.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63571 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02Thread CGFunctionInfo construction through CodeGenTypes.Daniel Dunbar
- 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
2009-02-02More ABI API cleanup.Daniel Dunbar
- 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
2009-02-02ABI handling API changes.Daniel Dunbar
- 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
2009-02-02Shuffle some functions around, no functionality change.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63538 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02Add FIXME.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63531 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-31Remove unused overload of GetFunctionType.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63472 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-31Initialize CGFunctionInfo isVariadic bit correctly.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63471 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-31Err, unbreak my previous "no functionality change commit", will fix properly ↵Daniel Dunbar
later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63467 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-31Kill off CGCallInfo, always use CGFunctionInfo for encapsulatingDaniel Dunbar
function/call info. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63466 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-31x86_64 ABI: Retool classification to compute lo & hi classificationsDaniel Dunbar
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
2009-01-30x86_64 ABI: Fix more thinkos, straddling computation for complex wasDaniel Dunbar
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
2009-01-30x86_64 ABI: Fix thinko in prev commit, 64-bit vectors should have SSEDaniel Dunbar
class, not integer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63426 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30x86_64 ABI: Pass <1 x double> in memory. This is arguably wrong, butDaniel Dunbar
matches gcc 4.2 (not llvm-gcc). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63413 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30Remove testing -use-x86_64-abi option; current implementation isDaniel Dunbar
robust enough for general use. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63406 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30x86_64 ABI: Split small vectors which cross an eightbyte boundary. Down to ↵Daniel Dunbar
33/500 return type failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63404 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30x86_64 ABI: Implement classification for arrays.Daniel Dunbar
- 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
2009-01-30Use uint64_t not unsigned for type sizes/offsets.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63352 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-29x86_64 ABI: Handle fields / complex components which straddleDaniel Dunbar
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
2009-01-29x86_64 ABI: Tweak merging algorithm so that we always bail early whenDaniel Dunbar
we see a Memory classification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63295 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-29ABI: When emitting calls which return an ignored argument, make sureDaniel Dunbar
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
2009-01-29x86_64 ABI: Implement classification for records.Daniel Dunbar
- 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
2009-01-29x86_64: Support cases which map to returning multiple values in LLVMDaniel Dunbar
(e.g., _Complex double -> { double, double } return). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63285 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-29x86_64 ABI: Classify _Complex ints as integer.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63283 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-27x86_64: Classify __m64 and __m128 "correctly".Daniel Dunbar
- 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