1f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org//===-- R600ISelLowering.h - R600 DAG Lowering Interface -*- C++ -*--------===// 2f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org// 3f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org// The LLVM Compiler Infrastructure 4f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org// 5f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org// This file is distributed under the University of Illinois Open Source 6f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org// License. See LICENSE.TXT for details. 7f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org// 8f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org//===----------------------------------------------------------------------===// 9f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org// 10f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org// R600 DAG Lowering interface definition 11f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org// 12f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org//===----------------------------------------------------------------------===// 13f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 14f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#ifndef R600ISELLOWERING_H 15f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define R600ISELLOWERING_H 16f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 17f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#include "AMDGPUISelLowering.h" 18f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 19f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgnamespace llvm { 20f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 21f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgclass R600InstrInfo; 22f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 23f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgclass R600TargetLowering : public AMDGPUTargetLowering 24f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org{ 25f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgpublic: 26f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org R600TargetLowering(TargetMachine &TM); 27f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org virtual MachineBasicBlock * EmitInstrWithCustomInserter(MachineInstr *MI, 28f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org MachineBasicBlock * BB) const; 29f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const; 30f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 31f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgprivate: 32f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org const R600InstrInfo * TII; 33f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 34f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org /// lowerImplicitParameter - Each OpenCL kernel has nine implicit parameters 35f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org /// that are stored in the first nine dwords of a Vertex Buffer. These 36f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org /// implicit parameters are lowered to load instructions which retreive the 37f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org /// values from the Vertex Buffer. 38f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org SDValue LowerImplicitParameter(SelectionDAG &DAG, EVT VT, 39f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org DebugLoc DL, unsigned DwordOffset) const; 40f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 41f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org void lowerImplicitParameter(MachineInstr *MI, MachineBasicBlock &BB, 42f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org MachineRegisterInfo & MRI, unsigned dword_offset) const; 43f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 44f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org SDValue LowerBR_CC(SDValue Op, SelectionDAG &DAG) const; 45f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 46f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org /// LowerROTL - Lower ROTL opcode to BITALIGN 47f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org SDValue LowerROTL(SDValue Op, SelectionDAG &DAG) const; 48f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 49f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org SDValue LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) const; 50f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org SDValue LowerSETCC(SDValue Op, SelectionDAG &DAG) const; 51f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 52f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org}; 53f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 54f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org} // End namespace llvm; 55f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 56f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#endif // R600ISELLOWERING_H 57