Drop support for Mips1 and Mips2.
[oota-llvm.git] / lib / Target / PTX / PTXISelLowering.h
1 //==-- PTXISelLowering.h - PTX DAG Lowering Interface ------------*- C++ -*-==//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines the interfaces that PTX uses to lower LLVM code into a
11 // selection DAG.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef PTX_ISEL_LOWERING_H
16 #define PTX_ISEL_LOWERING_H
17
18 #include "llvm/Target/TargetLowering.h"
19
20 namespace llvm {
21 class PTXSubtarget;
22 class PTXTargetMachine;
23
24 namespace PTXISD {
25   enum NodeType {
26     FIRST_NUMBER = ISD::BUILTIN_OP_END,
27     LOAD_PARAM,
28     STORE_PARAM,
29     EXIT,
30     RET,
31     COPY_ADDRESS,
32     CALL
33   };
34 }                               // namespace PTXISD
35
36 class PTXTargetLowering : public TargetLowering {
37   public:
38     explicit PTXTargetLowering(TargetMachine &TM);
39
40     virtual const char *getTargetNodeName(unsigned Opcode) const;
41
42     virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const;
43
44     virtual SDValue LowerSETCC(SDValue Op, SelectionDAG &DAG) const;
45
46     virtual SDValue
47       LowerFormalArguments(SDValue Chain,
48                            CallingConv::ID CallConv,
49                            bool isVarArg,
50                            const SmallVectorImpl<ISD::InputArg> &Ins,
51                            DebugLoc dl,
52                            SelectionDAG &DAG,
53                            SmallVectorImpl<SDValue> &InVals) const;
54
55     virtual SDValue
56       LowerReturn(SDValue Chain,
57                   CallingConv::ID CallConv,
58                   bool isVarArg,
59                   const SmallVectorImpl<ISD::OutputArg> &Outs,
60                   const SmallVectorImpl<SDValue> &OutVals,
61                   DebugLoc dl,
62                   SelectionDAG &DAG) const;
63
64     virtual SDValue
65       LowerCall(SDValue Chain, SDValue Callee,
66                 CallingConv::ID CallConv, bool isVarArg,
67                 bool &isTailCall,
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;
73
74     virtual EVT getSetCCResultType(EVT VT) const;
75
76   private:
77     SDValue LowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const;
78 }; // class PTXTargetLowering
79 } // namespace llvm
80
81 #endif // PTX_ISEL_LOWERING_H