LLVM  14.0.0git
R600RegisterInfo.h
Go to the documentation of this file.
1 //===-- R600RegisterInfo.h - R600 Register Info Interface ------*- C++ -*--===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 /// \file
10 /// Interface definition for R600RegisterInfo
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_AMDGPU_R600REGISTERINFO_H
15 #define LLVM_LIB_TARGET_AMDGPU_R600REGISTERINFO_H
16 
17 #define GET_REGINFO_HEADER
18 #include "R600GenRegisterInfo.inc"
19 
20 namespace llvm {
21 
22 struct R600RegisterInfo final : public R600GenRegisterInfo {
24 
25  /// \returns the sub reg enum value for the given \p Channel
26  /// (e.g. getSubRegFromChannel(0) -> R600::sub0)
27  static unsigned getSubRegFromChannel(unsigned Channel);
28 
29  BitVector getReservedRegs(const MachineFunction &MF) const override;
30  const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override;
31  Register getFrameRegister(const MachineFunction &MF) const override;
32 
33  /// get the HW encoding for a register's channel.
34  unsigned getHWRegChan(unsigned reg) const;
35 
36  unsigned getHWRegIndex(unsigned Reg) const;
37 
38  /// get the register class of the specified type to use in the
39  /// CFGStructurizer
41 
42  bool trackLivenessAfterRegAlloc(const MachineFunction &MF) const override {
43  return false;
44  }
45 
46  // \returns true if \p Reg can be defined in one ALU clause and used in
47  // another.
49 
51  unsigned FIOperandNum,
52  RegScavenger *RS = nullptr) const override;
53 
54  void reserveRegisterTuples(BitVector &Reserved, unsigned Reg) const;
55 };
56 
57 } // End namespace llvm
58 
59 #endif
MI
IRTranslator LLVM IR MI
Definition: IRTranslator.cpp:103
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
Reg
unsigned Reg
Definition: MachineSink.cpp:1566
llvm::R600RegisterInfo::getSubRegFromChannel
static unsigned getSubRegFromChannel(unsigned Channel)
Definition: R600RegisterInfo.cpp:24
llvm::R600RegisterInfo::R600RegisterInfo
R600RegisterInfo()
Definition: R600RegisterInfo.h:23
llvm::R600RegisterInfo::getCalleeSavedRegs
const MCPhysReg * getCalleeSavedRegs(const MachineFunction *MF) const override
Definition: R600RegisterInfo.cpp:70
llvm::R600RegisterInfo
Definition: R600RegisterInfo.h:22
llvm::R600RegisterInfo::eliminateFrameIndex
void eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj, unsigned FIOperandNum, RegScavenger *RS=nullptr) const override
Definition: R600RegisterInfo.cpp:108
llvm::R600RegisterInfo::getCFGStructurizerRegClass
const TargetRegisterClass * getCFGStructurizerRegClass(MVT VT) const
get the register class of the specified type to use in the CFGStructurizer
Definition: R600RegisterInfo.cpp:87
llvm::R600RegisterInfo::trackLivenessAfterRegAlloc
bool trackLivenessAfterRegAlloc(const MachineFunction &MF) const override
Definition: R600RegisterInfo.h:42
llvm::TargetRegisterClass
Definition: TargetRegisterInfo.h:46
llvm::R600RegisterInfo::reserveRegisterTuples
void reserveRegisterTuples(BitVector &Reserved, unsigned Reg) const
Definition: R600RegisterInfo.cpp:115
llvm::BitVector
Definition: BitVector.h:74
llvm::R600RegisterInfo::getFrameRegister
Register getFrameRegister(const MachineFunction &MF) const override
Definition: R600RegisterInfo.cpp:75
R600GenRegisterInfo
llvm::RegScavenger
Definition: RegisterScavenging.h:34
llvm::R600RegisterInfo::getHWRegIndex
unsigned getHWRegIndex(unsigned Reg) const
Definition: R600RegisterInfo.cpp:83
llvm::MVT
Machine Value Type.
Definition: MachineValueType.h:31
llvm::MachineFunction
Definition: MachineFunction.h:230
llvm::Register
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
uint16_t
llvm::R600RegisterInfo::getReservedRegs
BitVector getReservedRegs(const MachineFunction &MF) const override
Definition: R600RegisterInfo.cpp:36
llvm::R600RegisterInfo::isPhysRegLiveAcrossClauses
bool isPhysRegLiveAcrossClauses(Register Reg) const
Definition: R600RegisterInfo.cpp:95
llvm::R600RegisterInfo::getHWRegChan
unsigned getHWRegChan(unsigned reg) const
get the HW encoding for a register's channel.
Definition: R600RegisterInfo.cpp:79
llvm::MachineInstrBundleIterator< MachineInstr >