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,
36 class PTXTargetLowering : public TargetLowering {
38 explicit PTXTargetLowering(TargetMachine &TM);
40 virtual const char *getTargetNodeName(unsigned Opcode) const;
42 virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const;
44 virtual SDValue LowerSETCC(SDValue Op, SelectionDAG &DAG) const;
47 LowerFormalArguments(SDValue Chain,
48 CallingConv::ID CallConv,
50 const SmallVectorImpl<ISD::InputArg> &Ins,
53 SmallVectorImpl<SDValue> &InVals) const;
56 LowerReturn(SDValue Chain,
57 CallingConv::ID CallConv,
59 const SmallVectorImpl<ISD::OutputArg> &Outs,
60 const SmallVectorImpl<SDValue> &OutVals,
62 SelectionDAG &DAG) const;
65 LowerCall(SDValue Chain, SDValue Callee,
66 CallingConv::ID CallConv, bool isVarArg,
68 const SmallVectorImpl<ISD::OutputArg> &Outs,
69 const SmallVectorImpl<SDValue> &OutVals,
70 const SmallVectorImpl<ISD::InputArg> &Ins,
71 DebugLoc dl, SelectionDAG &DAG,
72 SmallVectorImpl<SDValue> &InVals) const;
74 virtual MVT::SimpleValueType getSetCCResultType(EVT VT) const;
77 SDValue LowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const;
78 }; // class PTXTargetLowering
81 #endif // PTX_ISEL_LOWERING_H