summaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/CallingConvLower.h
Commit message (Collapse)AuthorAgeFilesLines
* Convert more static tables of registers used by calling convention to ↵Craig Topper2012-03-111-6/+6
| | | | | | uint16_t to reduce space. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152538 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide an ARMCCState subclass of CCState so that ARM clients will always setCameron Zwarich2011-06-101-1/+4
| | | | | | CallOrPrologue correctly and eliminate the existing setter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132856 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename the ParmContext enum values to make a bit more sense and add a smallCameron Zwarich2011-06-101-1/+4
| | | | | | comment on their meaning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132854 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove tabs.Cameron Zwarich2011-06-101-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132853 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a parameter to CCState so that it can access the MachineFunction.Eric Christopher2011-06-081-1/+5
| | | | | | | | | No functional change. Part of PR6965 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132763 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM byval support. Will be enabled by another patch to the FE. ↵Stuart Hastings2011-04-201-0/+15
| | | | | | <rdar://problem/7662569> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129858 91177308-0d34-0410-b5e6-96231b3b80d8
* In the calling convention logic, ValVT is always a legal type,Duncan Sands2010-11-041-9/+9
| | | | | | | | and as such can be represented by an MVT - the more complicated EVT is not needed. Use MVT for ValVT everywhere. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118245 91177308-0d34-0410-b5e6-96231b3b80d8
* Inside the calling convention logic LocVT is always a simpleDuncan Sands2010-11-031-11/+11
| | | | | | | | | | | value type, so there is no point in passing it around using an EVT. Use the simpler MVT everywhere. Rather than trying to propagate this information maximally in all the code that using the calling convention stuff, I chose to do a mainly low impact change instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118167 91177308-0d34-0410-b5e6-96231b3b80d8
* Explain the return value of CCAssignFn.Duncan Sands2010-10-311-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117854 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix eabi calling convention when a 64 bit value shadows r3.Rafael Espindola2010-08-061-0/+6
| | | | | | | | | | | Without this what was happening was: * R3 is not marked as "used" * ARM backend thinks it has to save it to the stack because of vaarg * Offset computation correctly ignores it * Offsets are wrong git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110446 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply bottom-up fast-isel, with several fixes for x86-32:Dan Gohman2010-07-101-2/+1
| | | | | | | | | | - Check getBytesToPopOnReturn(). - Eschew ST0 and ST1 for return values. - Fix the PIC base register initialization so that it doesn't ever fail to end up the top of the entry block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108039 91177308-0d34-0410-b5e6-96231b3b80d8
* --- Reverse-merging r107947 into '.':Bob Wilson2010-07-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U utils/TableGen/FastISelEmitter.cpp --- Reverse-merging r107943 into '.': U test/CodeGen/X86/fast-isel.ll U test/CodeGen/X86/fast-isel-loads.ll U include/llvm/Target/TargetLowering.h U include/llvm/Support/PassNameParser.h U include/llvm/CodeGen/FunctionLoweringInfo.h U include/llvm/CodeGen/CallingConvLower.h U include/llvm/CodeGen/FastISel.h U include/llvm/CodeGen/SelectionDAGISel.h U lib/CodeGen/LLVMTargetMachine.cpp U lib/CodeGen/CallingConvLower.cpp U lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp U lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp U lib/CodeGen/SelectionDAG/FastISel.cpp U lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp U lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp U lib/CodeGen/SelectionDAG/InstrEmitter.cpp U lib/CodeGen/SelectionDAG/TargetLowering.cpp U lib/Target/XCore/XCoreISelLowering.cpp U lib/Target/XCore/XCoreISelLowering.h U lib/Target/X86/X86ISelLowering.cpp U lib/Target/X86/X86FastISel.cpp U lib/Target/X86/X86ISelLowering.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107987 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply bottom-up fast-isel, with fixes. Be very careful to avoid emittingDan Gohman2010-07-091-2/+1
| | | | | | | a DBG_VALUE after a terminator, or emitting any instructions before an EH_LABEL. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107943 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 107840 107839 107813 107804 107800 107797 107791.Dan Gohman2010-07-081-1/+2
| | | | | | | Debug info intrinsics win for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107850 91177308-0d34-0410-b5e6-96231b3b80d8
* Add X86FastISel support for return statements. This entails refactoringDan Gohman2010-07-071-2/+1
| | | | | | | | a bunch of stuff, to allow the target-independent calling convention logic to be employed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107800 91177308-0d34-0410-b5e6-96231b3b80d8
* Split the SDValue out of OutputArg so that SelectionDAG-independentDan Gohman2010-07-071-4/+0
| | | | | | | code can do calling-convention queries. This obviates OutputArgReg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107786 91177308-0d34-0410-b5e6-96231b3b80d8
* Move ArgFlagsTy, OutputArg, and InputArg out of SelectionDAGNodes.h andDan Gohman2010-07-071-1/+1
| | | | | | | into a new header, TargetCallingConv.h. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107782 91177308-0d34-0410-b5e6-96231b3b80d8
* Move CallingConvLower.cpp out of the SelectionDAG directory.Dan Gohman2010-07-071-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107781 91177308-0d34-0410-b5e6-96231b3b80d8
* Add versions of OutputArgReg, AnalyzeReturn, and AnalyzeCallOperandsDan Gohman2010-07-061-0/+4
| | | | | | | which do not depend on SelectionDAG. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107666 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new CCValAssign LocInfo value, and a comment explaining what itDan Gohman2010-07-061-0/+3
| | | | | | | should be used for. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107661 91177308-0d34-0410-b5e6-96231b3b80d8
* Add code to check at SelectionDAGISel::LowerArguments time to see if return ↵Kenneth Uildriks2009-11-071-0/+7
| | | | | | values can be lowered to registers. Coming soon, code to perform sret-demotion if return values cannot be lowered to registers git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86324 91177308-0d34-0410-b5e6-96231b3b80d8
* Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.Sandeep Patel2009-09-021-3/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80773 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-101-20/+20
| | | | | | own struct type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78610 91177308-0d34-0410-b5e6-96231b3b80d8
* Major calling convention code refactoring.Dan Gohman2009-08-051-9/+13
| | | | | | | | | | | | | | | | | | | | Instead of awkwardly encoding calling-convention information with ISD::CALL, ISD::FORMAL_ARGUMENTS, ISD::RET, and ISD::ARG_FLAGS nodes, TargetLowering provides three virtual functions for targets to override: LowerFormalArguments, LowerCall, and LowerRet, which replace the custom lowering done on the special nodes. They provide the same information, but in a more immediately usable format. This also reworks much of the target-independent tail call logic. The decision of whether or not to perform a tail call is now cleanly split between target-independent portions, and the target dependent portion in IsEligibleForTailCallOptimization. This also synchronizes all in-tree targets, to help enable future refactoring and feature work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78142 91177308-0d34-0410-b5e6-96231b3b80d8
* Add 'Indirect' LocInfo class and use to pass __m128 on win64. Also minore ↵Anton Korobeynikov2009-08-031-18/+23
| | | | | | fixes here and there (mostly __m64). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77964 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76702 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread LLVMContext through MVT and related parts of SDISel.Owen Anderson2009-07-091-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75153 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up formatting, remove trailing whitespace, fix comment typos andBob Wilson2009-04-171-6/+6
| | | | | | | punctuation. No functional changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69378 91177308-0d34-0410-b5e6-96231b3b80d8
* Use CallConvLower.h and TableGen descriptions of the calling conventionsBob Wilson2009-04-171-4/+36
| | | | | | | for ARM. Patch by Sandeep Patel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69371 91177308-0d34-0410-b5e6-96231b3b80d8
* Define CallSDNode, an SDNode subclass for use with ISD::CALL.Dan Gohman2008-09-131-2/+2
| | | | | | | | | | | | | | Currently it just holds the calling convention and flags for isVarArgs and isTailCall. And it has several utility methods, which eliminate magic 5+2*i and similar index computations in several places. CallSDNodes are not CSE'd. Teach UpdateNodeOperands to handle nodes that are not CSE'd gracefully. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56183 91177308-0d34-0410-b5e6-96231b3b80d8
* - Doh. Pass vector by value is bad.Evan Cheng2008-09-071-1/+4
| | | | | | | - Add a AnalyzeCallResult specialized for calls which produce a single value. This is used by fastisel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55879 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a variant of AnalyzeCallOperands that can be used by fast isel.Evan Cheng2008-09-051-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55838 91177308-0d34-0410-b5e6-96231b3b80d8
* Wrap MVT::ValueType in a struct to get type safetyDuncan Sands2008-06-061-12/+12
| | | | | | | | | | | | | | | | | and better control the abstraction. Rename the type to MVT. To update out-of-tree patches, the main thing to do is to rename MVT::ValueType to MVT, and rewrite expressions like MVT::getSizeInBits(VT) in the form VT.getSizeInBits(). Use VT.getSimpleVT() to extract a MVT::SimpleValueType for use in switch statements (you will get an assert failure if VT is an extended value type - these shouldn't exist after type legalization). This results in a small speedup of codegen and no new testsuite failures (x86-64 linux). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52044 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new CC lowering rule: provide a list of registers, which can be 'shadowed',Anton Korobeynikov2008-04-021-3/+25
| | | | | | | | when some another register is used for argument passing. Currently is used on Win64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49079 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a new node for holding call argumentDuncan Sands2008-03-211-3/+2
| | | | | | | | | | | | | | | | | | flags. This is needed by the new legalize types infrastructure which wants to expand the 64 bit constants previously used to hold the flags on 32 bit machines. There are two functional changes: (1) in LowerArguments, if a parameter has the zext attribute set then that is marked in the flags; before it was being ignored; (2) PPC had some bogus code for handling two word arguments when using the ELF 32 ABI, which was hard to convert because of the bogusness. As suggested by the original author (Nicolas Geoffray), I've disabled it for the moment. Tested with "make check" and the Ada ACATS testsuite. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48640 91177308-0d34-0410-b5e6-96231b3b80d8
* Increase ISD::ParamFlags to 64 bits. Increase the ByValSizeDale Johannesen2008-03-101-2/+4
| | | | | | | | | | | | field to 32 bits, thus enabling correct handling of ByVal structs bigger than 0x1ffff. Abstract interface a bit. Fixes gcc.c-torture/execute/pr23135.c and gcc.c-torture/execute/pr28982b.c in gcc testsuite (were ICE'ing on ppc32, quietly producing wrong code on x86-32.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48122 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename MRegisterInfo to TargetRegisterInfo.Dan Gohman2008-02-101-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46930 91177308-0d34-0410-b5e6-96231b3b80d8
* Oops. Forgot to commit this.Evan Cheng2008-01-151-3/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46003 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-291-2/+2
| | | | | | | | discussion of this change. Boy are my fingers tired. ;-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45411 91177308-0d34-0410-b5e6-96231b3b80d8
* propagate struct size and alignment of byval arguments to the DAGRafael Espindola2007-08-101-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40986 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize MVT::ValueType and associated functions to be able to representDan Gohman2007-06-251-2/+2
| | | | | | | | | | | | | | | | extended vector types. Remove the special SDNode opcodes used for pre-legalize vector operations, and the special MVT::Vector type used with them. Adjust lowering and legalize to work with the normal SDNode kinds instead, and to use the normal MVT functions to work with vector types instead of using the two special operands that the pre-legalize nodes held. This allows pre-legalize and post-legalize DAGs, and the code that operates on them, to be more consistent. Pre-legalize vector operators can be handled more consistently with scalar operators. And, -view-dag-combine1-dags and -view-legalize-dags now look prettier for vector code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37719 91177308-0d34-0410-b5e6-96231b3b80d8
* add isvararg tracking to CCStateChris Lattner2007-06-191-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37639 91177308-0d34-0410-b5e6-96231b3b80d8
* add methods for analysis of call results and return nodes.Chris Lattner2007-02-281-3/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34738 91177308-0d34-0410-b5e6-96231b3b80d8
* add methods to analyze calls and formals.Chris Lattner2007-02-281-1/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34736 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor refactoring of CC Lowering interfacesChris Lattner2007-02-271-55/+79
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34656 91177308-0d34-0410-b5e6-96231b3b80d8
* move CC Lowering stuff to its own public interfaceChris Lattner2007-02-271-0/+149
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34655 91177308-0d34-0410-b5e6-96231b3b80d8