LLVM 20.0.0git |
This class implements the register bank concept.More...
#include "llvm/CodeGen/RegisterBank.h"
Public Member Functions | |
constexpr | RegisterBank (unsignedID,constchar *Name,constuint32_t *CoveredClasses,unsigned NumRegClasses) |
unsigned | getID ()const |
Get the identifier of this register bank. | |
constchar * | getName ()const |
Get a user friendly name of this register bank. | |
bool | verify (constRegisterBankInfo &RBI,constTargetRegisterInfo &TRI)const |
Check if this register bank is valid. | |
bool | covers (constTargetRegisterClass &RC)const |
Check whether this register bank coversRC . | |
bool | operator== (constRegisterBank &OtherRB)const |
Check whetherOtherRB is the same as this. | |
bool | operator!= (constRegisterBank &OtherRB)const |
void | dump (constTargetRegisterInfo *TRI=nullptr)const |
Dump the register mask ondbgs() stream. | |
void | print (raw_ostream &OS,bool IsForDebug=false,constTargetRegisterInfo *TRI=nullptr)const |
Print the register mask on OS. | |
This class implements the register bank concept.
Two instances ofRegisterBank must have different ID. This property is enforced by theRegisterBankInfo class.
Definition at line28 of fileRegisterBank.h.
| inlineconstexpr |
Definition at line39 of fileRegisterBank.h.
bool RegisterBank::covers | ( | constTargetRegisterClass & | RC | ) | const |
Check whether this register bank coversRC
.
In other words, check if this register bank fully covers the registers thatRC
contains.
Definition at line52 of fileRegisterBank.cpp.
Referencesllvm::TargetRegisterClass::getID().
Referenced byllvm::AArch64RegisterBankInfo::AArch64RegisterBankInfo(),llvm::ARMRegisterBankInfo::ARMRegisterBankInfo(),llvm::RegisterBankInfo::constrainGenericRegister(),llvm::RegisterBankInfo::getRegBankFromConstraints(),print(),verify(), andllvm::X86RegisterBankInfo::X86RegisterBankInfo().
LLVM_DUMP_METHOD void RegisterBank::dump | ( | constTargetRegisterInfo * | TRI =nullptr | ) | const |
Dump the register mask ondbgs() stream.
The dump is verbose.
Definition at line66 of fileRegisterBank.cpp.
Referencesllvm::dbgs(),print(), andTRI.
| inline |
Get the identifier of this register bank.
Definition at line45 of fileRegisterBank.h.
Referenced byllvm::AArch64RegisterBankInfo::AArch64RegisterBankInfo(),llvm::AMDGPURegisterBankInfo::applyMappingImpl(),llvm::ARMRegisterBankInfo::ARMRegisterBankInfo(),llvm::ARM::checkPartMapping(),llvm::AMDGPURegisterBankInfo::collectWaterfallOperands(),getAnySgprS1(),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(),AMDGPURegBankLegalizeCombiner::isLaneMask(),isLaneMaskFromSameBlock(),isVectorRegisterBank(),operator==(),print(),selectCopy(),selectMergeValues(),selectUnmergeValues(),verify(),llvm::RegisterBankInfo::verify(), andllvm::X86RegisterBankInfo::X86RegisterBankInfo().
Get a user friendly name of this register bank.
Should be used only for debugging purposes.
Definition at line49 of fileRegisterBank.h.
Referenced byprint(), andllvm::printRegClassOrBank().
| inline |
Definition at line66 of fileRegisterBank.h.
Referencesoperator==().
bool RegisterBank::operator== | ( | constRegisterBank & | OtherRB | ) | const |
Check whetherOtherRB
is the same as this.
Definition at line56 of fileRegisterBank.cpp.
Referencesassert(), andgetID().
Referenced byoperator!=().
void RegisterBank::print | ( | raw_ostream & | OS, |
bool | IsForDebug =false , | ||
constTargetRegisterInfo * | 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 line71 of fileRegisterBank.cpp.
Referencesassert(),covers(),End,getID(),getName(),OS,llvm::popcount(), andTRI.
Referenced bydump(), andllvm::operator<<().
bool RegisterBank::verify | ( | constRegisterBankInfo & | RBI, |
constTargetRegisterInfo & | TRI | ||
) | const |
Check if this register bank is valid.
In other words, if it has been properly constructed.
Definition at line23 of fileRegisterBank.cpp.
Referencesassert(),covers(),End,getID(),llvm::RegisterBankInfo::getMaximumSize(),llvm::TargetRegisterClass::hasSubClassEq(), andTRI.
Referenced byllvm::RegisterBankInfo::verify().