2008-11-07 10:59:00 +00:00
|
|
|
//===-- XCoreISelLowering.h - XCore DAG Lowering Interface ------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file defines the interfaces that XCore uses to lower LLVM code into a
|
|
|
|
// selection DAG.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-13 16:26:38 +00:00
|
|
|
#ifndef LLVM_LIB_TARGET_XCORE_XCOREISELLOWERING_H
|
|
|
|
#define LLVM_LIB_TARGET_XCORE_XCOREISELLOWERING_H
|
2008-11-07 10:59:00 +00:00
|
|
|
|
2012-03-17 18:46:09 +00:00
|
|
|
#include "XCore.h"
|
2008-11-07 10:59:00 +00:00
|
|
|
#include "llvm/CodeGen/SelectionDAG.h"
|
|
|
|
#include "llvm/Target/TargetLowering.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
2011-02-25 21:41:48 +00:00
|
|
|
|
2008-11-07 10:59:00 +00:00
|
|
|
// Forward delcarations
|
|
|
|
class XCoreSubtarget;
|
|
|
|
class XCoreTargetMachine;
|
2011-02-25 21:41:48 +00:00
|
|
|
|
2008-11-07 10:59:00 +00:00
|
|
|
namespace XCoreISD {
|
|
|
|
enum NodeType {
|
|
|
|
// Start the numbering where the builtin ops and target ops leave off.
|
2010-02-15 06:38:41 +00:00
|
|
|
FIRST_NUMBER = ISD::BUILTIN_OP_END,
|
2008-11-07 10:59:00 +00:00
|
|
|
|
|
|
|
// Branch and link (call)
|
|
|
|
BL,
|
|
|
|
|
|
|
|
// pc relative address
|
|
|
|
PCRelativeWrapper,
|
|
|
|
|
|
|
|
// dp relative address
|
|
|
|
DPRelativeWrapper,
|
2011-02-25 21:41:48 +00:00
|
|
|
|
2008-11-07 10:59:00 +00:00
|
|
|
// cp relative address
|
|
|
|
CPRelativeWrapper,
|
2011-02-25 21:41:48 +00:00
|
|
|
|
2014-02-27 17:47:54 +00:00
|
|
|
// Load word from stack
|
|
|
|
LDWSP,
|
|
|
|
|
2008-11-07 10:59:00 +00:00
|
|
|
// Store word to stack
|
|
|
|
STWSP,
|
|
|
|
|
|
|
|
// Corresponds to retsp instruction
|
|
|
|
RETSP,
|
2011-02-25 21:41:48 +00:00
|
|
|
|
2008-11-07 10:59:00 +00:00
|
|
|
// Corresponds to LADD instruction
|
|
|
|
LADD,
|
|
|
|
|
|
|
|
// Corresponds to LSUB instruction
|
2010-02-23 13:25:07 +00:00
|
|
|
LSUB,
|
|
|
|
|
2010-03-10 13:27:10 +00:00
|
|
|
// Corresponds to LMUL instruction
|
|
|
|
LMUL,
|
|
|
|
|
2010-03-10 11:41:08 +00:00
|
|
|
// Corresponds to MACCU instruction
|
|
|
|
MACCU,
|
|
|
|
|
|
|
|
// Corresponds to MACCS instruction
|
|
|
|
MACCS,
|
|
|
|
|
2013-01-25 21:20:28 +00:00
|
|
|
// Corresponds to CRC8 instruction
|
|
|
|
CRC8,
|
|
|
|
|
2010-02-23 13:25:07 +00:00
|
|
|
// Jumptable branch.
|
|
|
|
BR_JT,
|
|
|
|
|
|
|
|
// Jumptable branch using long branches for each entry.
|
2013-11-12 10:11:26 +00:00
|
|
|
BR_JT32,
|
|
|
|
|
2014-01-06 14:21:00 +00:00
|
|
|
// Offset from frame pointer to the first (possible) on-stack argument
|
|
|
|
FRAME_TO_ARGS_OFFSET,
|
|
|
|
|
2014-01-06 14:21:07 +00:00
|
|
|
// Exception handler return. The stack is restored to the first
|
|
|
|
// followed by a jump to the second argument.
|
|
|
|
EH_RETURN,
|
|
|
|
|
2013-11-12 10:11:26 +00:00
|
|
|
// Memory barrier.
|
|
|
|
MEMBARRIER
|
2008-11-07 10:59:00 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
//===--------------------------------------------------------------------===//
|
|
|
|
// TargetLowering Implementation
|
|
|
|
//===--------------------------------------------------------------------===//
|
2011-02-25 21:41:48 +00:00
|
|
|
class XCoreTargetLowering : public TargetLowering
|
2008-11-07 10:59:00 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2014-07-02 00:10:09 +00:00
|
|
|
explicit XCoreTargetLowering(const TargetMachine &TM);
|
2008-11-07 10:59:00 +00:00
|
|
|
|
2013-10-11 10:26:29 +00:00
|
|
|
using TargetLowering::isZExtFree;
|
2014-04-29 07:57:00 +00:00
|
|
|
bool isZExtFree(SDValue Val, EVT VT2) const override;
|
2013-10-11 10:26:29 +00:00
|
|
|
|
|
|
|
|
2014-04-29 07:57:00 +00:00
|
|
|
unsigned getJumpTableEncoding() const override;
|
|
|
|
MVT getScalarShiftAmountTy(EVT LHSTy) const override { return MVT::i32; }
|
2010-03-11 14:58:56 +00:00
|
|
|
|
2008-11-07 10:59:00 +00:00
|
|
|
/// LowerOperation - Provide custom lowering hooks for some operations.
|
2014-04-29 07:57:00 +00:00
|
|
|
SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const override;
|
2008-11-14 15:59:19 +00:00
|
|
|
|
2008-12-01 11:39:25 +00:00
|
|
|
/// ReplaceNodeResults - Replace the results of node with an illegal result
|
|
|
|
/// type with new values built out of custom code.
|
|
|
|
///
|
2014-04-29 07:57:00 +00:00
|
|
|
void ReplaceNodeResults(SDNode *N, SmallVectorImpl<SDValue>&Results,
|
|
|
|
SelectionDAG &DAG) const override;
|
2008-11-07 10:59:00 +00:00
|
|
|
|
2011-02-25 21:41:48 +00:00
|
|
|
/// getTargetNodeName - This method returns the name of a target specific
|
2008-11-07 10:59:00 +00:00
|
|
|
// DAG node.
|
2014-04-29 07:57:00 +00:00
|
|
|
const char *getTargetNodeName(unsigned Opcode) const override;
|
2011-02-25 21:41:48 +00:00
|
|
|
|
2014-04-29 07:57:00 +00:00
|
|
|
MachineBasicBlock *
|
2010-05-01 00:01:06 +00:00
|
|
|
EmitInstrWithCustomInserter(MachineInstr *MI,
|
2014-04-29 07:57:00 +00:00
|
|
|
MachineBasicBlock *MBB) const override;
|
2008-11-07 10:59:00 +00:00
|
|
|
|
2014-04-29 07:57:00 +00:00
|
|
|
bool isLegalAddressingMode(const AddrMode &AM, Type *Ty) const override;
|
2008-11-07 10:59:00 +00:00
|
|
|
|
|
|
|
private:
|
2014-07-02 00:10:09 +00:00
|
|
|
const TargetMachine &TM;
|
2008-11-07 10:59:00 +00:00
|
|
|
const XCoreSubtarget &Subtarget;
|
2011-02-25 21:41:48 +00:00
|
|
|
|
2008-11-07 10:59:00 +00:00
|
|
|
// Lower Operand helpers
|
Major calling convention code refactoring.
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
2009-08-05 01:29:28 +00:00
|
|
|
SDValue LowerCCCArguments(SDValue Chain,
|
2009-09-02 08:44:58 +00:00
|
|
|
CallingConv::ID CallConv,
|
Major calling convention code refactoring.
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
2009-08-05 01:29:28 +00:00
|
|
|
bool isVarArg,
|
|
|
|
const SmallVectorImpl<ISD::InputArg> &Ins,
|
2013-05-25 02:42:55 +00:00
|
|
|
SDLoc dl, SelectionDAG &DAG,
|
2010-04-17 15:26:15 +00:00
|
|
|
SmallVectorImpl<SDValue> &InVals) const;
|
Major calling convention code refactoring.
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
2009-08-05 01:29:28 +00:00
|
|
|
SDValue LowerCCCCallTo(SDValue Chain, SDValue Callee,
|
2009-09-02 08:44:58 +00:00
|
|
|
CallingConv::ID CallConv, bool isVarArg,
|
Major calling convention code refactoring.
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
2009-08-05 01:29:28 +00:00
|
|
|
bool isTailCall,
|
|
|
|
const SmallVectorImpl<ISD::OutputArg> &Outs,
|
2010-07-07 15:54:55 +00:00
|
|
|
const SmallVectorImpl<SDValue> &OutVals,
|
Major calling convention code refactoring.
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
2009-08-05 01:29:28 +00:00
|
|
|
const SmallVectorImpl<ISD::InputArg> &Ins,
|
2013-05-25 02:42:55 +00:00
|
|
|
SDLoc dl, SelectionDAG &DAG,
|
2010-04-17 15:26:15 +00:00
|
|
|
SmallVectorImpl<SDValue> &InVals) const;
|
|
|
|
SDValue getReturnAddressFrameIndex(SelectionDAG &DAG) const;
|
2010-04-15 01:51:59 +00:00
|
|
|
SDValue getGlobalAddressWrapper(SDValue GA, const GlobalValue *GV,
|
2010-04-17 15:26:15 +00:00
|
|
|
SelectionDAG &DAG) const;
|
2013-05-25 02:42:55 +00:00
|
|
|
SDValue lowerLoadWordFromAlignedBasePlusOffset(SDLoc DL, SDValue Chain,
|
2013-05-04 17:17:10 +00:00
|
|
|
SDValue Base, int64_t Offset,
|
|
|
|
SelectionDAG &DAG) const;
|
2008-11-07 10:59:00 +00:00
|
|
|
|
|
|
|
// Lower Operand specifics
|
2010-04-17 15:26:15 +00:00
|
|
|
SDValue LowerLOAD(SDValue Op, SelectionDAG &DAG) const;
|
|
|
|
SDValue LowerSTORE(SDValue Op, SelectionDAG &DAG) const;
|
2014-01-06 14:21:07 +00:00
|
|
|
SDValue LowerEH_RETURN(SDValue Op, SelectionDAG &DAG) const;
|
2010-04-17 15:26:15 +00:00
|
|
|
SDValue LowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const;
|
|
|
|
SDValue LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const;
|
|
|
|
SDValue LowerBlockAddress(SDValue Op, SelectionDAG &DAG) const;
|
|
|
|
SDValue LowerConstantPool(SDValue Op, SelectionDAG &DAG) const;
|
|
|
|
SDValue LowerBR_JT(SDValue Op, SelectionDAG &DAG) const;
|
|
|
|
SDValue LowerVAARG(SDValue Op, SelectionDAG &DAG) const;
|
|
|
|
SDValue LowerVASTART(SDValue Op, SelectionDAG &DAG) const;
|
|
|
|
SDValue LowerUMUL_LOHI(SDValue Op, SelectionDAG &DAG) const;
|
|
|
|
SDValue LowerSMUL_LOHI(SDValue Op, SelectionDAG &DAG) const;
|
|
|
|
SDValue LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) const;
|
2014-01-06 14:21:00 +00:00
|
|
|
SDValue LowerFRAME_TO_ARGS_OFFSET(SDValue Op, SelectionDAG &DAG) const;
|
2014-01-06 14:20:53 +00:00
|
|
|
SDValue LowerRETURNADDR(SDValue Op, SelectionDAG &DAG) const;
|
2011-09-06 13:37:06 +00:00
|
|
|
SDValue LowerINIT_TRAMPOLINE(SDValue Op, SelectionDAG &DAG) const;
|
|
|
|
SDValue LowerADJUST_TRAMPOLINE(SDValue Op, SelectionDAG &DAG) const;
|
2013-01-25 21:20:28 +00:00
|
|
|
SDValue LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG) const;
|
2013-11-12 10:11:26 +00:00
|
|
|
SDValue LowerATOMIC_FENCE(SDValue Op, SelectionDAG &DAG) const;
|
2014-02-11 10:36:18 +00:00
|
|
|
SDValue LowerATOMIC_LOAD(SDValue Op, SelectionDAG &DAG) const;
|
|
|
|
SDValue LowerATOMIC_STORE(SDValue Op, SelectionDAG &DAG) const;
|
2011-02-25 21:41:48 +00:00
|
|
|
|
2008-11-07 10:59:00 +00:00
|
|
|
// Inline asm support
|
2011-06-29 17:53:29 +00:00
|
|
|
std::pair<unsigned, const TargetRegisterClass*>
|
|
|
|
getRegForInlineAsmConstraint(const std::string &Constraint,
|
2014-04-29 07:57:00 +00:00
|
|
|
MVT VT) const override;
|
2011-02-25 21:41:48 +00:00
|
|
|
|
2008-11-07 10:59:00 +00:00
|
|
|
// Expand specifics
|
2010-04-17 15:26:15 +00:00
|
|
|
SDValue TryExpandADDWithMul(SDNode *Op, SelectionDAG &DAG) const;
|
|
|
|
SDValue ExpandADDSUB(SDNode *Op, SelectionDAG &DAG) const;
|
2009-07-16 12:50:48 +00:00
|
|
|
|
2014-04-29 07:57:00 +00:00
|
|
|
SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const override;
|
Major calling convention code refactoring.
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
2009-08-05 01:29:28 +00:00
|
|
|
|
2014-05-14 21:14:37 +00:00
|
|
|
void computeKnownBitsForTargetNode(const SDValue Op,
|
|
|
|
APInt &KnownZero,
|
|
|
|
APInt &KnownOne,
|
|
|
|
const SelectionDAG &DAG,
|
|
|
|
unsigned Depth = 0) const override;
|
2010-03-09 16:07:47 +00:00
|
|
|
|
2014-04-29 07:57:00 +00:00
|
|
|
SDValue
|
Major calling convention code refactoring.
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
2009-08-05 01:29:28 +00:00
|
|
|
LowerFormalArguments(SDValue Chain,
|
2009-09-02 08:44:58 +00:00
|
|
|
CallingConv::ID CallConv,
|
Major calling convention code refactoring.
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
2009-08-05 01:29:28 +00:00
|
|
|
bool isVarArg,
|
|
|
|
const SmallVectorImpl<ISD::InputArg> &Ins,
|
2013-05-25 02:42:55 +00:00
|
|
|
SDLoc dl, SelectionDAG &DAG,
|
2014-04-29 07:57:00 +00:00
|
|
|
SmallVectorImpl<SDValue> &InVals) const override;
|
Major calling convention code refactoring.
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
2009-08-05 01:29:28 +00:00
|
|
|
|
2014-04-29 07:57:00 +00:00
|
|
|
SDValue
|
2012-05-25 16:35:28 +00:00
|
|
|
LowerCall(TargetLowering::CallLoweringInfo &CLI,
|
2014-04-29 07:57:00 +00:00
|
|
|
SmallVectorImpl<SDValue> &InVals) const override;
|
Major calling convention code refactoring.
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
2009-08-05 01:29:28 +00:00
|
|
|
|
2014-04-29 07:57:00 +00:00
|
|
|
SDValue
|
Major calling convention code refactoring.
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
2009-08-05 01:29:28 +00:00
|
|
|
LowerReturn(SDValue Chain,
|
2009-09-02 08:44:58 +00:00
|
|
|
CallingConv::ID CallConv, bool isVarArg,
|
Major calling convention code refactoring.
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
2009-08-05 01:29:28 +00:00
|
|
|
const SmallVectorImpl<ISD::OutputArg> &Outs,
|
2010-07-07 15:54:55 +00:00
|
|
|
const SmallVectorImpl<SDValue> &OutVals,
|
2014-04-29 07:57:00 +00:00
|
|
|
SDLoc dl, SelectionDAG &DAG) const override;
|
2009-11-14 19:33:35 +00:00
|
|
|
|
2014-04-29 07:57:00 +00:00
|
|
|
bool
|
2011-06-08 23:55:35 +00:00
|
|
|
CanLowerReturn(CallingConv::ID CallConv, MachineFunction &MF,
|
2012-07-19 00:11:40 +00:00
|
|
|
bool isVarArg,
|
2010-07-10 09:00:22 +00:00
|
|
|
const SmallVectorImpl<ISD::OutputArg> &ArgsFlags,
|
2014-04-29 07:57:00 +00:00
|
|
|
LLVMContext &Context) const override;
|
2008-11-07 10:59:00 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2014-08-13 16:26:38 +00:00
|
|
|
#endif
|