Go to the documentation of this file.
33 #ifndef TCE_TARGET_LOWERING_H
34 #define TCE_TARGET_LOWERING_H
36 #include <llvm/CodeGen/TargetLowering.h>
39 #include "tce_config.h"
76 #define SDLOC_PARAM_TYPE const SDLoc&
78 class TCETargetMachine;
88 virtual SDValue
LowerOperation(SDValue Op, SelectionDAG &DAG)
const override;
90 SDNode *N, DAGCombinerInfo &DCI)
const override;
97 std::pair<unsigned, const TargetRegisterClass *>
99 StringRef Constraint, MVT VT)
const override;
103 std::string& Constraint,
104 std::vector<SDValue>& Ops,
105 SelectionDAG& DAG)
const override;
108 std::vector<unsigned>
117 CallingConv::ID CallConv,
119 const SmallVectorImpl<ISD::InputArg> &Ins,
121 SmallVectorImpl<SDValue> &InVals)
const override;
123 SDValue
LowerTRAP(SDValue Op, SelectionDAG &DAG)
const;
124 SDValue
LowerVASTART(SDValue Op, SelectionDAG &DAG)
const;
129 SDValue
LowerShift(SDValue op, SelectionDAG& dag)
const;
131 SDValue Op, MVT newElementVT,
int elemCount, SelectionDAG &DAG)
const;
132 SDValue
lowerHWLoops(SDValue op, SelectionDAG &dag)
const;
139 LowerCall(TargetLowering::CallLoweringInfo &CLI,
140 SmallVectorImpl<SDValue> &InVals)
const override;
144 CallingConv::ID CallConv,
bool isVarArg,
145 const SmallVectorImpl<ISD::OutputArg> &Outs,
146 const SmallVectorImpl<SDValue> &OutVals,
183 const TargetRegisterClass*
185 const TargetRegisterInfo* TRI, MVT VT)
const;
191 std::pair<unsigned, const TargetRegisterClass *>
202 const DataLayout &DL, LLVMContext &Context,
203 EVT VT)
const override;
206 const APFloat& apf, EVT VT,
bool forCodeSize)
const override;
209 RTLIB::Libcall LC, SDNode *Node,
bool isSigned, SelectionDAG &DAG)
213 SmallVectorImpl< SDValue > &,
214 SelectionDAG &)
const override;
virtual SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const override
SDValue LowerVASTART(SDValue Op, SelectionDAG &DAG) const
SDValue LowerBlockAddress(SDValue Op, SelectionDAG &DAG) const
void LowerAsmOperandForConstraint(SDValue Op, std::string &Constraint, std::vector< SDValue > &Ops, SelectionDAG &DAG) const override
bool isConstantOrUndefBuild(const SDNode &node) const
llvm::EVT getSetCCResultType(const DataLayout &DL, LLVMContext &Context, EVT VT) const override
virtual bool isFPImmLegal(const APFloat &apf, EVT VT, bool forCodeSize) const override
virtual SDValue LowerFormalArguments(SDValue Chain, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl< ISD::InputArg > &Ins, SDLOC_PARAM_TYPE dl, SelectionDAG &DAG, SmallVectorImpl< SDValue > &InVals) const override
getFunctionAlignment - Return the Log2 alignment of this function.
SDValue lowerExtOrBoolLoad(SDValue op, SelectionDAG &DAG) const
SDValue LowerConstant(SDValue Op, SelectionDAG &DAG) const
SDValue LowerBuildVector(SDValue Op, SelectionDAG &DAG) const
static bool isBroadcast(SDNode *n)
SDValue LowerShift(SDValue op, SelectionDAG &dag) const
void addVectorRegisterClasses()
Implementation generated to Backend.inc from TDGenSIMD.cc.
SDValue LowerTRAP(SDValue Op, SelectionDAG &DAG) const
virtual SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl< ISD::OutputArg > &Outs, const SmallVectorImpl< SDValue > &OutVals, SDLOC_PARAM_TYPE dl, SelectionDAG &DAG) const override
SDValue LowerINLINEASM(SDValue Op, SelectionDAG &DAG) const
bool canEncodeImmediate(const ConstantSDNode &node) const
TCETargetLowering(TargetMachine &TM, const TCESubtarget &subt)
std::pair< unsigned, const TargetRegisterClass * > associatedVectorRegClass(const EVT &vt) const
Implementation generated to Backend.inc from TDGenSIMD.cc.
void addVectorLowerings()
Implementation generated to Backend.inc from TDGenSIMD.cc.
virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const override
SDValue ExpandLibCall(RTLIB::Libcall LC, SDNode *Node, bool isSigned, SelectionDAG &DAG) const
std::vector< unsigned > getRegClassForInlineAsmConstraint(const std::string &Constraint, EVT VT) const
const TargetRegisterClass * getVectorRegClassForInlineAsmConstraint(const TargetRegisterInfo *TRI, MVT VT) const
std::map< unsigned, bool > loadGAFromConstantPool_
Predicates to tell whenever the addresses belonging to a address space should be loaded from constant...
SDValue lowerHWLoops(SDValue op, SelectionDAG &dag) const
void ReplaceNodeResults(SDNode *node, SmallVectorImpl< SDValue > &, SelectionDAG &) const override
virtual SDValue LowerCall(TargetLowering::CallLoweringInfo &CLI, SmallVectorImpl< SDValue > &InVals) const override
std::pair< unsigned, const TargetRegisterClass * > getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI, StringRef Constraint, MVT VT) const override
virtual llvm::EVT getSetCCResultVT(const EVT &VT) const
Implementation generated to Backend.inc from TDGenSIMD.cc.
virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const override
virtual const char * getTargetNodeName(unsigned opcode) const override
ConstraintType getConstraintType(StringRef Constraint) const override
getConstraintType - Given a constraint letter, return the type of constraint it is for this target.
bool hasI1RegisterClass() const
bool canEncodeConstantOperands(const SDNode &node) const
int getVarArgsFrameOffset() const
std::pair< int, TCEString > getConstShiftNodeAndTCEOP(SDValue op) const
SDValue LowerBuildBooleanVectorVector(SDValue Op, MVT newElementVT, int elemCount, SelectionDAG &DAG) const
bool hasI1RC_
Tells if the target machine has boolean register file.
bool shouldLoadFromConstantPool(unsigned addressSpace) const
SDValue LowerGLOBALADDRESS(SDValue Op, SelectionDAG &DAG) const