LLVM 20.0.0git
|
This class implements the register bank concept. More...
#include "llvm/CodeGen/RegisterBank.h"
Public Member Functions | |
constexpr | RegisterBank (unsigned ID, const char *Name, const uint32_t *CoveredClasses, unsigned NumRegClasses) |
unsigned | getID () const |
Get the identifier of this register bank. | |
const char * | getName () const |
Get a user friendly name of this register bank. | |
bool | verify (const RegisterBankInfo &RBI, const TargetRegisterInfo &TRI) const |
Check if this register bank is valid. | |
bool | covers (const TargetRegisterClass &RC) const |
Check whether this register bank covers RC . | |
bool | operator== (const RegisterBank &OtherRB) const |
Check whether OtherRB is the same as this. | |
bool | operator!= (const RegisterBank &OtherRB) const |
void | dump (const TargetRegisterInfo *TRI=nullptr) const |
Dump the register mask on dbgs() stream. | |
void | print (raw_ostream &OS, bool IsForDebug=false, const TargetRegisterInfo *TRI=nullptr) const |
Print the register mask on OS. | |
This class implements the register bank concept.
Two instances of RegisterBank must have different ID. This property is enforced by the RegisterBankInfo class.
Definition at line 28 of file RegisterBank.h.
|
inlineconstexpr |
Definition at line 39 of file RegisterBank.h.
bool RegisterBank::covers | ( | const TargetRegisterClass & | RC | ) | const |
Check whether this register bank covers RC
.
In other words, check if this register bank fully covers the registers that RC
contains.
Definition at line 52 of file RegisterBank.cpp.
References llvm::TargetRegisterClass::getID().
Referenced by llvm::AArch64RegisterBankInfo::AArch64RegisterBankInfo(), llvm::ARMRegisterBankInfo::ARMRegisterBankInfo(), llvm::RegisterBankInfo::constrainGenericRegister(), llvm::RegisterBankInfo::getRegBankFromConstraints(), print(), verify(), and llvm::X86RegisterBankInfo::X86RegisterBankInfo().
LLVM_DUMP_METHOD void RegisterBank::dump | ( | const TargetRegisterInfo * | TRI = nullptr | ) | const |
Dump the register mask on dbgs() stream.
The dump is verbose.
Definition at line 66 of file RegisterBank.cpp.
References llvm::dbgs(), print(), and TRI.
|
inline |
Get the identifier of this register bank.
Definition at line 45 of file RegisterBank.h.
Referenced by llvm::AArch64RegisterBankInfo::AArch64RegisterBankInfo(), llvm::AMDGPURegisterBankInfo::applyMappingImpl(), llvm::ARMRegisterBankInfo::ARMRegisterBankInfo(), llvm::ARM::checkPartMapping(), llvm::AMDGPURegisterBankInfo::collectWaterfallOperands(), getInsertVecEltOpInfo(), llvm::AArch64RegisterBankInfo::getInstrMapping(), llvm::AMDGPURegisterBankInfo::getInstrMapping(), llvm::PPCRegisterBankInfo::getInstrMapping(), llvm::SIInstrInfo::getInstructionUniformity(), getMinClassForRegBank(), getMinSizeForRegBank(), llvm::AMDGPURegisterBankInfo::getRegBankID(), llvm::SIRegisterInfo::getRegClassForSizeOnBank(), llvm::AMDGPURegisterBankInfo::getValueMappingForPtr(), hashPartialMapping(), isVectorRegisterBank(), operator==(), print(), selectCopy(), selectMergeValues(), selectUnmergeValues(), verify(), llvm::RegisterBankInfo::verify(), and llvm::X86RegisterBankInfo::X86RegisterBankInfo().
Get a user friendly name of this register bank.
Should be used only for debugging purposes.
Definition at line 49 of file RegisterBank.h.
Referenced by print(), and llvm::printRegClassOrBank().
|
inline |
Definition at line 66 of file RegisterBank.h.
References operator==().
bool RegisterBank::operator== | ( | const RegisterBank & | OtherRB | ) | const |
Check whether OtherRB
is the same as this.
Definition at line 56 of file RegisterBank.cpp.
References assert(), and getID().
Referenced by operator!=().
void RegisterBank::print | ( | raw_ostream & | OS, |
bool | IsForDebug = false , |
||
const TargetRegisterInfo * | TRI = nullptr |
||
) | const |
Print the register mask on OS.
If IsForDebug is false, then only the name of the register bank is printed. Otherwise, all the fields are printing. TRI is then used to print the name of the register classes that this register bank covers.
Definition at line 71 of file RegisterBank.cpp.
References assert(), covers(), End, getID(), getName(), OS, llvm::popcount(), and TRI.
Referenced by dump(), and llvm::operator<<().
bool RegisterBank::verify | ( | const RegisterBankInfo & | RBI, |
const TargetRegisterInfo & | TRI | ||
) | const |
Check if this register bank is valid.
In other words, if it has been properly constructed.
Definition at line 23 of file RegisterBank.cpp.
References assert(), covers(), End, getID(), llvm::RegisterBankInfo::getMaximumSize(), llvm::TargetRegisterClass::hasSubClassEq(), and TRI.
Referenced by llvm::RegisterBankInfo::verify().