SIISelLowering.h revision 01115b1f5032b848659669b161af1bdd9e646208
1//===-- SIISelLowering.h - SI 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/// \file
11/// \brief SI DAG Lowering interface definition
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef SIISELLOWERING_H
16#define SIISELLOWERING_H
17
18#include "AMDGPUISelLowering.h"
19#include "SIInstrInfo.h"
20
21namespace llvm {
22
23class SITargetLowering : public AMDGPUTargetLowering {
24  const SIInstrInfo * TII;
25
26  void LowerMOV_IMM(MachineInstr *MI, MachineBasicBlock &BB,
27              MachineBasicBlock::iterator I, unsigned Opocde) const;
28  void LowerSI_INTERP(MachineInstr *MI, MachineBasicBlock &BB,
29              MachineBasicBlock::iterator I, MachineRegisterInfo & MRI) const;
30  void LowerSI_WQM(MachineInstr *MI, MachineBasicBlock &BB,
31              MachineBasicBlock::iterator I, MachineRegisterInfo & MRI) const;
32  void LowerSI_V_CNDLT(MachineInstr *MI, MachineBasicBlock &BB,
33              MachineBasicBlock::iterator I, MachineRegisterInfo & MRI) const;
34
35  SDValue Loweri1ContextSwitch(SDValue Op, SelectionDAG &DAG,
36                                           unsigned VCCNode) const;
37  SDValue LowerLOAD(SDValue Op, SelectionDAG &DAG) const;
38  SDValue LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) const;
39  SDValue LowerBRCOND(SDValue Op, SelectionDAG &DAG) const;
40
41public:
42  SITargetLowering(TargetMachine &tm);
43  virtual MachineBasicBlock * EmitInstrWithCustomInserter(MachineInstr * MI,
44                                              MachineBasicBlock * BB) const;
45  virtual EVT getSetCCResultType(EVT VT) const;
46  virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const;
47  virtual SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const;
48  virtual const char* getTargetNodeName(unsigned Opcode) const;
49};
50
51} // End namespace llvm
52
53#endif //SIISELLOWERING_H
54