1 //==-- PTXISelLowering.h - PTX DAG Lowering Interface ------------*- C++ -*-==//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines the interfaces that PTX uses to lower LLVM code into a
13 //===----------------------------------------------------------------------===//
15 #ifndef PTX_ISEL_LOWERING_H
16 #define PTX_ISEL_LOWERING_H
18 #include "llvm/Target/TargetLowering.h"
22 class PTXTargetMachine;
26 FIRST_NUMBER = ISD::BUILTIN_OP_END,
38 class PTXTargetLowering : public TargetLowering {
40 explicit PTXTargetLowering(TargetMachine &TM);
42 virtual const char *getTargetNodeName(unsigned Opcode) const;
44 virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const;
46 virtual SDValue LowerSETCC(SDValue Op, SelectionDAG &DAG) const;
49 LowerFormalArguments(SDValue Chain,
50 CallingConv::ID CallConv,
52 const SmallVectorImpl<ISD::InputArg> &Ins,
55 SmallVectorImpl<SDValue> &InVals) const;
58 LowerReturn(SDValue Chain,
59 CallingConv::ID CallConv,
61 const SmallVectorImpl<ISD::OutputArg> &Outs,
62 const SmallVectorImpl<SDValue> &OutVals,
64 SelectionDAG &DAG) const;
67 LowerCall(SDValue Chain, SDValue Callee,
68 CallingConv::ID CallConv, bool isVarArg,
70 const SmallVectorImpl<ISD::OutputArg> &Outs,
71 const SmallVectorImpl<SDValue> &OutVals,
72 const SmallVectorImpl<ISD::InputArg> &Ins,
73 DebugLoc dl, SelectionDAG &DAG,
74 SmallVectorImpl<SDValue> &InVals) const;
76 virtual EVT getSetCCResultType(EVT VT) const;
78 virtual unsigned getNumRegisters(LLVMContext &Context, EVT VT);
81 SDValue LowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const;
82 }; // class PTXTargetLowering
85 #endif // PTX_ISEL_LOWERING_H