LLVM  3.7.0
AMDGPURegisterInfo.h
Go to the documentation of this file.
1 //===-- AMDGPURegisterInfo.h - AMDGPURegisterInfo 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 TargetRegisterInfo interface that is implemented by all hw codegen
12 /// targets.
13 //
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef LLVM_LIB_TARGET_R600_AMDGPUREGISTERINFO_H
17 #define LLVM_LIB_TARGET_R600_AMDGPUREGISTERINFO_H
18 
19 #include "llvm/ADT/BitVector.h"
21 
22 #define GET_REGINFO_HEADER
23 #define GET_REGINFO_ENUM
24 #include "AMDGPUGenRegisterInfo.inc"
25 
26 namespace llvm {
27 
28 class AMDGPUSubtarget;
29 class TargetInstrInfo;
30 
32  static const MCPhysReg CalleeSavedReg;
33 
35 
36  BitVector getReservedRegs(const MachineFunction &MF) const override {
37  assert(!"Unimplemented"); return BitVector();
38  }
39 
41  assert(!"Unimplemented"); return nullptr;
42  }
43 
44  virtual unsigned getHWRegIndex(unsigned Reg) const {
45  assert(!"Unimplemented"); return 0;
46  }
47 
48  /// \returns the sub reg enum value for the given \p Channel
49  /// (e.g. getSubRegFromChannel(0) -> AMDGPU::sub0)
50  unsigned getSubRegFromChannel(unsigned Channel) const;
51 
52  const MCPhysReg* getCalleeSavedRegs(const MachineFunction *MF) const override;
54  unsigned FIOperandNum,
55  RegScavenger *RS) const override;
56  unsigned getFrameRegister(const MachineFunction &MF) const override;
57 
58  unsigned getIndirectSubReg(unsigned IndirectIndex) const;
59 
60 };
61 
62 } // End namespace llvm
63 
64 #endif
unsigned getIndirectSubReg(unsigned IndirectIndex) const
const MCPhysReg * getCalleeSavedRegs(const MachineFunction *MF) const override
uint16_t MCPhysReg
An unsigned integer type large enough to represent all physical registers, but not necessarily virtua...
BitVector getReservedRegs(const MachineFunction &MF) const override
virtual const TargetRegisterClass * getCFGStructurizerRegClass(MVT VT) const
Reg
All possible values of the reg field in the ModR/M byte.
MVT - Machine Value Type.
bundle_iterator - MachineBasicBlock iterator that automatically skips over MIs that are inside bundle...
unsigned getSubRegFromChannel(unsigned Channel) const
virtual unsigned getHWRegIndex(unsigned Reg) const
static const MCPhysReg CalleeSavedReg
void eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj, unsigned FIOperandNum, RegScavenger *RS) const override
unsigned getFrameRegister(const MachineFunction &MF) const override