Changeset View
Changeset View
Standalone View
Standalone View
lib/Target/RISCV/RISCVISelLowering.h
Show All 18 Lines | |||||
#include "llvm/CodeGen/SelectionDAG.h" | #include "llvm/CodeGen/SelectionDAG.h" | ||||
#include "llvm/Target/TargetLowering.h" | #include "llvm/Target/TargetLowering.h" | ||||
namespace llvm { | namespace llvm { | ||||
class RISCVSubtarget; | class RISCVSubtarget; | ||||
namespace RISCVISD { | namespace RISCVISD { | ||||
enum NodeType : unsigned { | enum NodeType : unsigned { | ||||
FIRST_NUMBER = ISD::BUILTIN_OP_END, | FIRST_NUMBER = ISD::BUILTIN_OP_END, | ||||
RET_FLAG | RET_FLAG, | ||||
CALL | |||||
}; | }; | ||||
} | } | ||||
class RISCVTargetLowering : public TargetLowering { | class RISCVTargetLowering : public TargetLowering { | ||||
const RISCVSubtarget *Subtarget; | const RISCVSubtarget *Subtarget; | ||||
public: | public: | ||||
explicit RISCVTargetLowering(const TargetMachine &TM, | explicit RISCVTargetLowering(const TargetMachine &TM, | ||||
Show All 11 Lines | SDValue LowerFormalArguments(SDValue Chain, CallingConv::ID CallConv, | ||||
bool IsVarArg, | bool IsVarArg, | ||||
const SmallVectorImpl<ISD::InputArg> &Ins, | const SmallVectorImpl<ISD::InputArg> &Ins, | ||||
const SDLoc &DL, SelectionDAG &DAG, | const SDLoc &DL, SelectionDAG &DAG, | ||||
SmallVectorImpl<SDValue> &InVals) const override; | SmallVectorImpl<SDValue> &InVals) const override; | ||||
SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool IsVarArg, | SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool IsVarArg, | ||||
const SmallVectorImpl<ISD::OutputArg> &Outs, | const SmallVectorImpl<ISD::OutputArg> &Outs, | ||||
const SmallVectorImpl<SDValue> &OutVals, const SDLoc &DL, | const SmallVectorImpl<SDValue> &OutVals, const SDLoc &DL, | ||||
SelectionDAG &DAG) const override; | SelectionDAG &DAG) const override; | ||||
SDValue LowerCall(TargetLowering::CallLoweringInfo &CLI, | |||||
SmallVectorImpl<SDValue> &InVals) const override; | |||||
bool shouldConvertConstantLoadToIntImm(const APInt &Imm, | bool shouldConvertConstantLoadToIntImm(const APInt &Imm, | ||||
Type *Ty) const override { | Type *Ty) const override { | ||||
return true; | return true; | ||||
} | } | ||||
SDValue lowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const; | SDValue lowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const; | ||||
}; | }; | ||||
} | } | ||||
#endif | #endif |