LLVM API Documentation
00001 //===-- AMDGPURegisterInfo.h - AMDGPURegisterInfo Interface -*- C++ -*-----===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 /// \file 00011 /// \brief TargetRegisterInfo interface that is implemented by all hw codegen 00012 /// targets. 00013 // 00014 //===----------------------------------------------------------------------===// 00015 00016 #ifndef LLVM_LIB_TARGET_R600_AMDGPUREGISTERINFO_H 00017 #define LLVM_LIB_TARGET_R600_AMDGPUREGISTERINFO_H 00018 00019 #include "llvm/ADT/BitVector.h" 00020 #include "llvm/Target/TargetRegisterInfo.h" 00021 00022 #define GET_REGINFO_HEADER 00023 #define GET_REGINFO_ENUM 00024 #include "AMDGPUGenRegisterInfo.inc" 00025 00026 namespace llvm { 00027 00028 class AMDGPUSubtarget; 00029 class TargetInstrInfo; 00030 00031 struct AMDGPURegisterInfo : public AMDGPUGenRegisterInfo { 00032 static const MCPhysReg CalleeSavedReg; 00033 const AMDGPUSubtarget &ST; 00034 00035 AMDGPURegisterInfo(const AMDGPUSubtarget &st); 00036 00037 BitVector getReservedRegs(const MachineFunction &MF) const override { 00038 assert(!"Unimplemented"); return BitVector(); 00039 } 00040 00041 virtual const TargetRegisterClass* getCFGStructurizerRegClass(MVT VT) const { 00042 assert(!"Unimplemented"); return nullptr; 00043 } 00044 00045 virtual unsigned getHWRegIndex(unsigned Reg) const { 00046 assert(!"Unimplemented"); return 0; 00047 } 00048 00049 /// \returns the sub reg enum value for the given \p Channel 00050 /// (e.g. getSubRegFromChannel(0) -> AMDGPU::sub0) 00051 unsigned getSubRegFromChannel(unsigned Channel) const; 00052 00053 const MCPhysReg* getCalleeSavedRegs(const MachineFunction *MF) const override; 00054 void eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj, 00055 unsigned FIOperandNum, 00056 RegScavenger *RS) const override; 00057 unsigned getFrameRegister(const MachineFunction &MF) const override; 00058 00059 unsigned getIndirectSubReg(unsigned IndirectIndex) const; 00060 00061 }; 00062 00063 } // End namespace llvm 00064 00065 #endif