[llvm-exegesis][NFC] Pass Instruction instead of bare Opcode
[llvm-core.git] / lib / Target / AMDGPU / R600RegisterInfo.h
blobc4c77172b299b75aa20a16b6c235dc3ffdf419c9
1 //===-- R600RegisterInfo.h - R600 Register Info 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 /// Interface definition for R600RegisterInfo
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_LIB_TARGET_AMDGPU_R600REGISTERINFO_H
16 #define LLVM_LIB_TARGET_AMDGPU_R600REGISTERINFO_H
18 #define GET_REGINFO_HEADER
19 #include "R600GenRegisterInfo.inc"
21 namespace llvm {
23 struct R600RegisterInfo final : public R600GenRegisterInfo {
24 RegClassWeight RCW;
26 R600RegisterInfo();
28 BitVector getReservedRegs(const MachineFunction &MF) const override;
29 const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override;
30 unsigned getFrameRegister(const MachineFunction &MF) const override;
32 /// get the HW encoding for a register's channel.
33 unsigned getHWRegChan(unsigned reg) const;
35 unsigned getHWRegIndex(unsigned Reg) const;
37 /// get the register class of the specified type to use in the
38 /// CFGStructurizer
39 const TargetRegisterClass *getCFGStructurizerRegClass(MVT VT) const;
41 const RegClassWeight &
42 getRegClassWeight(const TargetRegisterClass *RC) const override;
44 // \returns true if \p Reg can be defined in one ALU clause and used in
45 // another.
46 bool isPhysRegLiveAcrossClauses(unsigned Reg) const;
48 void eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj,
49 unsigned FIOperandNum,
50 RegScavenger *RS = nullptr) const override;
52 void reserveRegisterTuples(BitVector &Reserved, unsigned Reg) const;
55 } // End namespace llvm
57 #endif