1 //===-- AMDGPUISelLowering.h - AMDGPU 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 contains the interface defintiion of the TargetLowering class
11 // that is common to all AMD GPUs.
13 //===----------------------------------------------------------------------===//
15 #ifndef AMDGPUISELLOWERING_H
16 #define AMDGPUISELLOWERING_H
18 #include "AMDILISelLowering.h"
22 class AMDGPUTargetLowering : public AMDILTargetLowering
25 SDValue LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG) const;
26 SDValue LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) const;
27 SDValue LowerUDIVREM(SDValue Op, SelectionDAG &DAG) const;
31 /// addLiveIn - This functions adds reg to the live in list of the entry block
32 /// and emits a copy from reg to MI.getOperand(0).
34 // Some registers are loaded with values before the program
35 /// begins to execute. The loading of these values is modeled with pseudo
36 /// instructions which are lowered using this function.
37 void addLiveIn(MachineInstr * MI, MachineFunction * MF,
38 MachineRegisterInfo & MRI, const TargetInstrInfo * TII,
41 bool isHWTrueValue(SDValue Op) const;
42 bool isHWFalseValue(SDValue Op) const;
45 AMDGPUTargetLowering(TargetMachine &TM);
47 virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const;
48 SDValue LowerIntrinsicIABS(SDValue Op, SelectionDAG &DAG) const;
49 SDValue LowerIntrinsicLRP(SDValue Op, SelectionDAG &DAG) const;
50 virtual const char* getTargetNodeName(unsigned Opcode) const;
59 AMDGPU_FIRST = AMDILISD::LAST_ISD_NUMBER,
69 LAST_AMDGPU_ISD_NUMBER
73 } // End namespace AMDGPUISD
75 } // End namespace llvm
77 #endif // AMDGPUISELLOWERING_H