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,
32 class PTXTargetLowering : public TargetLowering {
34 explicit PTXTargetLowering(TargetMachine &TM);
36 virtual const char *getTargetNodeName(unsigned Opcode) const;
38 virtual unsigned getFunctionAlignment(const Function *F) const {
41 virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const;
44 LowerFormalArguments(SDValue Chain,
45 CallingConv::ID CallConv,
47 const SmallVectorImpl<ISD::InputArg> &Ins,
50 SmallVectorImpl<SDValue> &InVals) const;
53 LowerReturn(SDValue Chain,
54 CallingConv::ID CallConv,
56 const SmallVectorImpl<ISD::OutputArg> &Outs,
57 const SmallVectorImpl<SDValue> &OutVals,
59 SelectionDAG &DAG) const;
62 SDValue LowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const;
63 }; // class PTXTargetLowering
66 #endif // PTX_ISEL_LOWERING_H