f57ee97788858df1009e2f506e89755c5cf21de3
[mesa.git] / src / gallium / drivers / radeon / R600ISelLowering.h
1 //===-- R600ISelLowering.h - R600 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 // R600 DAG Lowering interface definition
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef R600ISELLOWERING_H
15 #define R600ISELLOWERING_H
16
17 #include "AMDGPUISelLowering.h"
18
19 namespace llvm {
20
21 class R600InstrInfo;
22
23 class R600TargetLowering : public AMDGPUTargetLowering
24 {
25 public:
26 R600TargetLowering(TargetMachine &TM);
27 virtual MachineBasicBlock * EmitInstrWithCustomInserter(MachineInstr *MI,
28 MachineBasicBlock * BB) const;
29 virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const;
30
31 private:
32 const R600InstrInfo * TII;
33
34 /// lowerImplicitParameter - Each OpenCL kernel has nine implicit parameters
35 /// that are stored in the first nine dwords of a Vertex Buffer. These
36 /// implicit parameters are represented by pseudo instructions, which are
37 /// lowered to VTX_READ instructions by this function.
38 void lowerImplicitParameter(MachineInstr *MI, MachineBasicBlock &BB,
39 MachineRegisterInfo & MRI, unsigned dword_offset) const;
40
41 SDValue LowerBR_CC(SDValue Op, SelectionDAG &DAG) const;
42
43 /// LowerROTL - Lower ROTL opcode to BITALIGN
44 SDValue LowerROTL(SDValue Op, SelectionDAG &DAG) const;
45
46 SDValue LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) const;
47 SDValue LowerSETCC(SDValue Op, SelectionDAG &DAG) const;
48
49 };
50
51 } // End namespace llvm;
52
53 #endif // R600ISELLOWERING_H