1 //===-- AMDGPURegisterInfo.h - AMDGPURegisterInfo Interface -*- C++ -*-----===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 /// TargetRegisterInfo interface that is implemented by all hw codegen
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUREGISTERINFO_H
16 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUREGISTERINFO_H
18 #define GET_REGINFO_HEADER
19 #include "AMDGPUGenRegisterInfo.inc"
24 class TargetInstrInfo
;
26 struct AMDGPURegisterInfo
: public AMDGPUGenRegisterInfo
{
29 /// \returns the sub reg enum value for the given \p Channel
30 /// (e.g. getSubRegFromChannel(0) -> AMDGPU::sub0)
31 static unsigned getSubRegFromChannel(unsigned Channel
, unsigned NumRegs
= 1);
33 void reserveRegisterTuples(BitVector
&, unsigned Reg
) const;
36 } // End namespace llvm