diff options
author | Dale Johannesen <dalej@apple.com> | 2008-09-26 19:31:26 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-09-26 19:31:26 +0000 |
commit | 86098bd6a63d2cdf0c9be9ef3151bd2728281fd7 (patch) | |
tree | ec0d224a2780a707ab69dec8941ae3a64170339a /include | |
parent | 97135e1ee51357245561a5108f90a8a1161431a1 (diff) |
Add "inreg" field to CallSDNode (doesn't increase
its size). Adjust various lowering functions to
pass this info through from CallInst. Use it to
implement sseregparm returns on X86. Remove
X86_ssecall calling convention.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56677 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CallingConv.h | 6 | ||||
-rw-r--r-- | include/llvm/CodeGen/SelectionDAG.h | 3 | ||||
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 10 | ||||
-rw-r--r-- | include/llvm/Target/TargetLowering.h | 6 |
4 files changed, 14 insertions, 11 deletions
diff --git a/include/llvm/CallingConv.h b/include/llvm/CallingConv.h index 9f268f142d..072f7c3863 100644 --- a/include/llvm/CallingConv.h +++ b/include/llvm/CallingConv.h @@ -57,11 +57,7 @@ namespace CallingConv { /// X86_FastCall - 'fast' analog of X86_StdCall. Passes first two arguments /// in ECX:EDX registers, others - via stack. Callee is responsible for /// stack cleaning. - X86_FastCall = 65, - - /// X86_SSEreg - The standard convention except that float and double - /// values are returned in XMM0 if SSE support is available. - X86_SSECall = 66 + X86_FastCall = 65 }; } // End CallingConv namespace diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h index 6ca8a8c861..3c09460205 100644 --- a/include/llvm/CodeGen/SelectionDAG.h +++ b/include/llvm/CodeGen/SelectionDAG.h @@ -467,7 +467,8 @@ public: /// getCall - Create a CALL node from the given information. /// SDValue getCall(unsigned CallingConv, bool IsVarArgs, bool IsTailCall, - SDVTList VTs, const SDValue *Operands, unsigned NumOperands); + bool isInreg, SDVTList VTs, const SDValue *Operands, + unsigned NumOperands); /// getLoad - Loads are not normal binary operators: their result type is not /// determined by their operands, and they produce a value AND a token chain. diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 111d3f849a..1d085100db 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -2191,17 +2191,23 @@ class CallSDNode : public SDNode { unsigned CallingConv; bool IsVarArg; bool IsTailCall; + // We might eventually want a full-blown Attributes for the result; that + // will expand the size of the representation. At the moment we only + // need Inreg. + bool Inreg; virtual void ANCHOR(); // Out-of-line virtual method to give class a home. protected: friend class SelectionDAG; - CallSDNode(unsigned cc, bool isvararg, bool istailcall, + CallSDNode(unsigned cc, bool isvararg, bool istailcall, bool isinreg, SDVTList VTs, const SDValue *Operands, unsigned numOperands) : SDNode(ISD::CALL, VTs, Operands, numOperands), - CallingConv(cc), IsVarArg(isvararg), IsTailCall(istailcall) {} + CallingConv(cc), IsVarArg(isvararg), IsTailCall(istailcall), + Inreg(isinreg) {} public: unsigned getCallingConv() const { return CallingConv; } unsigned isVarArg() const { return IsVarArg; } unsigned isTailCall() const { return IsTailCall; } + unsigned isInreg() const { return Inreg; } /// Set this call to not be marked as a tail call. Normally setter /// methods in SDNodes are unsafe because it breaks the CSE map, diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index 7c25c6d3ac..2f8758b4ef 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -994,9 +994,9 @@ public: typedef std::vector<ArgListEntry> ArgListTy; virtual std::pair<SDValue, SDValue> LowerCallTo(SDValue Chain, const Type *RetTy, bool RetSExt, bool RetZExt, - bool isVarArg, unsigned CallingConv, bool isTailCall, - SDValue Callee, ArgListTy &Args, SelectionDAG &DAG); - + bool isVarArg, bool isInreg, unsigned CallingConv, + bool isTailCall, SDValue Callee, ArgListTy &Args, + SelectionDAG &DAG); /// EmitTargetCodeForMemcpy - Emit target-specific code that performs a /// memcpy. This can be used by targets to provide code sequences for cases |