1 //===-- R600ISelLowering.h - R600 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 // R600 DAG Lowering interface definition
12 //===----------------------------------------------------------------------===//
14 #ifndef R600ISELLOWERING_H
15 #define R600ISELLOWERING_H
17 #include "AMDGPUISelLowering.h"
23 class R600TargetLowering
: public AMDGPUTargetLowering
26 R600TargetLowering(TargetMachine
&TM
);
27 virtual MachineBasicBlock
* EmitInstrWithCustomInserter(MachineInstr
*MI
,
28 MachineBasicBlock
* BB
) const;
29 virtual SDValue
LowerOperation(SDValue Op
, SelectionDAG
&DAG
) const;
30 void ReplaceNodeResults(SDNode
* N
,
31 SmallVectorImpl
<SDValue
> &Results
,
32 SelectionDAG
&DAG
) const;
34 const R600InstrInfo
* TII
;
36 /// lowerImplicitParameter - Each OpenCL kernel has nine implicit parameters
37 /// that are stored in the first nine dwords of a Vertex Buffer. These
38 /// implicit parameters are lowered to load instructions which retreive the
39 /// values from the Vertex Buffer.
40 SDValue
LowerImplicitParameter(SelectionDAG
&DAG
, EVT VT
,
41 DebugLoc DL
, unsigned DwordOffset
) const;
43 void lowerImplicitParameter(MachineInstr
*MI
, MachineBasicBlock
&BB
,
44 MachineRegisterInfo
& MRI
, unsigned dword_offset
) const;
46 SDValue
LowerBR_CC(SDValue Op
, SelectionDAG
&DAG
) const;
48 /// LowerROTL - Lower ROTL opcode to BITALIGN
49 SDValue
LowerROTL(SDValue Op
, SelectionDAG
&DAG
) const;
51 SDValue
LowerSELECT_CC(SDValue Op
, SelectionDAG
&DAG
) const;
52 SDValue
LowerSETCC(SDValue Op
, SelectionDAG
&DAG
) const;
53 SDValue
LowerFPTOUINT(SDValue Op
, SelectionDAG
&DAG
) const;
56 } // End namespace llvm;
58 #endif // R600ISELLOWERING_H