Make the logic for determining function alignment more explicit. No functionality...
[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     READ_PARAM,
28     EXIT,
29     RET,
30     COPY_ADDRESS
31   };
32 } // namespace PTXISD
33
34 class PTXTargetLowering : public TargetLowering {
35   public:
36     explicit PTXTargetLowering(TargetMachine &TM);
37
38     virtual const char *getTargetNodeName(unsigned Opcode) const;
39
40     virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const;
41
42     virtual SDValue LowerSETCC(SDValue Op, SelectionDAG &DAG) const;
43     
44     virtual SDValue
45       LowerFormalArguments(SDValue Chain,
46                            CallingConv::ID CallConv,
47                            bool isVarArg,
48                            const SmallVectorImpl<ISD::InputArg> &Ins,
49                            DebugLoc dl,
50                            SelectionDAG &DAG,
51                            SmallVectorImpl<SDValue> &InVals) const;
52
53     virtual SDValue
54       LowerReturn(SDValue Chain,
55                   CallingConv::ID CallConv,
56                   bool isVarArg,
57                   const SmallVectorImpl<ISD::OutputArg> &Outs,
58                   const SmallVectorImpl<SDValue> &OutVals,
59                   DebugLoc dl,
60                   SelectionDAG &DAG) const;
61     
62     virtual MVT::SimpleValueType getSetCCResultType(EVT VT) const;
63     
64   private:
65     SDValue LowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const;
66 }; // class PTXTargetLowering
67 } // namespace llvm
68
69 #endif // PTX_ISEL_LOWERING_H