LLVM  4.0.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_AMDGPU_AMDGPUREGISTERINFO_H
17 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUREGISTERINFO_H
18 
20 
21 #define GET_REGINFO_HEADER
22 #define GET_REGINFO_ENUM
23 #include "AMDGPUGenRegisterInfo.inc"
24 
25 namespace llvm {
26 
27 class AMDGPUSubtarget;
28 class TargetInstrInfo;
29 
32 
33  /// \returns the sub reg enum value for the given \p Channel
34  /// (e.g. getSubRegFromChannel(0) -> AMDGPU::sub0)
35  unsigned getSubRegFromChannel(unsigned Channel) const;
36 
37  const MCPhysReg* getCalleeSavedRegs(const MachineFunction *MF) const override;
38  unsigned getFrameRegister(const MachineFunction &MF) const override;
39 };
40 
41 } // End namespace llvm
42 
43 #endif
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...
unsigned getSubRegFromChannel(unsigned Channel) const
unsigned getFrameRegister(const MachineFunction &MF) const override