class RegisterBank
Declaration
class RegisterBank { /* full declaration omitted */ };
Description
This class implements the register bank concept. Two instances of RegisterBank must have different ID. This property is enforced by the RegisterBankInfo class.
Declared at: llvm/include/llvm/CodeGen/RegisterBank.h:28
Member Variables
- private unsigned int ID
- private const char* Name
- private unsigned int Size
- private llvm::BitVector ContainedRegClasses
- private static const unsigned int InvalidID
- Sentinel value used to recognize register bank not properly initialized yet.
Method Overview
- public RegisterBank(unsigned int ID, const char * Name, unsigned int Size, const uint32_t * CoveredClasses, unsigned int NumRegClasses)
- public bool covers(const llvm::TargetRegisterClass & RC) const
- public void dump(const llvm::TargetRegisterInfo * TRI = nullptr) const
- public unsigned int getID() const
- public const char * getName() const
- public unsigned int getSize() const
- public bool isValid() const
- public void print(llvm::raw_ostream & OS, bool IsForDebug = false, const llvm::TargetRegisterInfo * TRI = nullptr) const
- public bool verify(const llvm::TargetRegisterInfo & TRI) const
Methods
¶RegisterBank(unsigned int ID,
const char* Name,
unsigned int Size,
const uint32_t* CoveredClasses,
unsigned int NumRegClasses)
RegisterBank(unsigned int ID,
const char* Name,
unsigned int Size,
const uint32_t* CoveredClasses,
unsigned int NumRegClasses)
Declared at: llvm/include/llvm/CodeGen/RegisterBank.h:43
Parameters
- unsigned int ID
- const char* Name
- unsigned int Size
- const uint32_t* CoveredClasses
- unsigned int NumRegClasses
¶bool covers(
const llvm::TargetRegisterClass& RC) const
bool covers(
const llvm::TargetRegisterClass& RC) const
Description
Check whether this register bank covers \p RC. In other words, check if this register bank fully covers the registers that \p RC contains.
Declared at: llvm/include/llvm/CodeGen/RegisterBank.h:71
Parameters
- const llvm::TargetRegisterClass& RC
¶void dump(const llvm::TargetRegisterInfo* TRI =
nullptr) const
void dump(const llvm::TargetRegisterInfo* TRI =
nullptr) const
Description
Dump the register mask on dbgs() stream. The dump is verbose.
Declared at: llvm/include/llvm/CodeGen/RegisterBank.h:81
Parameters
- const llvm::TargetRegisterInfo* TRI = nullptr
¶unsigned int getID() const
unsigned int getID() const
Description
Get the identifier of this register bank.
Declared at: llvm/include/llvm/CodeGen/RegisterBank.h:47
¶const char* getName() const
const char* getName() const
Description
Get a user friendly name of this register bank. Should be used only for debugging purposes.
Declared at: llvm/include/llvm/CodeGen/RegisterBank.h:51
¶unsigned int getSize() const
unsigned int getSize() const
Description
Get the maximal size in bits that fits in this register bank.
Declared at: llvm/include/llvm/CodeGen/RegisterBank.h:54
¶bool isValid() const
bool isValid() const
Description
Check whether this instance is ready to be used.
Declared at: llvm/include/llvm/CodeGen/RegisterBank.h:57
¶void print(llvm::raw_ostream& OS,
bool IsForDebug = false,
const llvm::TargetRegisterInfo* TRI =
nullptr) const
void print(llvm::raw_ostream& OS,
bool IsForDebug = false,
const llvm::TargetRegisterInfo* TRI =
nullptr) const
Description
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.
Declared at: llvm/include/llvm/CodeGen/RegisterBank.h:88
Parameters
- llvm::raw_ostream& OS
- bool IsForDebug = false
- const llvm::TargetRegisterInfo* TRI = nullptr
¶bool verify(
const llvm::TargetRegisterInfo& TRI) const
bool verify(
const llvm::TargetRegisterInfo& TRI) const
Description
Check if this register bank is valid. In other words, if it has been properly constructed.
Declared at: llvm/include/llvm/CodeGen/RegisterBank.h:65
Parameters
- const llvm::TargetRegisterInfo& TRI
Returns
True is the check was successful.