15d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)//===-- R600ISelLowering.h - R600 DAG Lowering Interface -*- C++ -*--------===//
25d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)//
35d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)//                     The LLVM Compiler Infrastructure
45d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)//
55d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// This file is distributed under the University of Illinois Open Source
65d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// License. See LICENSE.TXT for details.
7010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)//
85d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)//===----------------------------------------------------------------------===//
95d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)//
105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// R600 DAG Lowering interface definition
115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)//
125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)//===----------------------------------------------------------------------===//
135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#ifndef R600ISELLOWERING_H
155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define R600ISELLOWERING_H
165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "AMDGPUISelLowering.h"
185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)namespace llvm {
205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)class R600InstrInfo;
225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
23010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)class R600TargetLowering : public AMDGPUTargetLowering
245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles){
255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)public:
26010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)  R600TargetLowering(TargetMachine &TM);
27010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)  virtual MachineBasicBlock * EmitInstrWithCustomInserter(MachineInstr *MI,
285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      MachineBasicBlock * BB) const;
29  virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const;
30
31private:
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 lowered to load instructions which retreive the
37  /// values from the Vertex Buffer.
38  SDValue LowerImplicitParameter(SelectionDAG &DAG, EVT VT,
39                                 DebugLoc DL, unsigned DwordOffset) const;
40
41  void lowerImplicitParameter(MachineInstr *MI, MachineBasicBlock &BB,
42      MachineRegisterInfo & MRI, unsigned dword_offset) const;
43
44  SDValue LowerBR_CC(SDValue Op, SelectionDAG &DAG) const;
45
46  /// LowerROTL - Lower ROTL opcode to BITALIGN
47  SDValue LowerROTL(SDValue Op, SelectionDAG &DAG) const;
48
49  SDValue LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) const;
50  SDValue LowerSETCC(SDValue Op, SelectionDAG &DAG) const;
51
52};
53
54} // End namespace llvm;
55
56#endif // R600ISELLOWERING_H
57