struct RegisterBankInfo::ValueMapping
Declaration
struct RegisterBankInfo::ValueMapping { /* full declaration omitted */ };
Description
Helper struct that represents how a value is mapped through different register banks. E.g., Let say we have a 32-bit add and a < 2 x 32-bit> vadd. We can expand the < 2 x 32-bit> add into 2 x 32-bit add. Currently the TableGen-like file would look like: With the array of pointer, we would have: Given that a PartialMapping is actually small, the code size impact is actually a degradation. Moreover the compile time will be hit by the additional indirection. If PartialMapping gets bigger we may reconsider.
Declared at: llvm/include/llvm/CodeGen/RegisterBankInfo.h:145
Member Variables
- public const llvm::RegisterBankInfo::PartialMapping* BreakDown
- How the value is broken down between the different register banks.
- public unsigned int NumBreakDowns
- Number of partial mapping to break down this value.
Method Overview
- public ValueMapping()
- public ValueMapping(const llvm::RegisterBankInfo::PartialMapping * BreakDown, unsigned int NumBreakDowns)
- public const llvm::RegisterBankInfo::PartialMapping * begin() const
- public void dump() const
- public const llvm::RegisterBankInfo::PartialMapping * end() const
- public bool isValid() const
- public bool partsAllUniform() const
- public void print(llvm::raw_ostream & OS) const
- public bool verify(unsigned int MeaningfulBitWidth) const
Methods
¶ValueMapping()
ValueMapping()
Description
The default constructor creates an invalid (isValid() == false) instance.
Declared at: llvm/include/llvm/CodeGen/RegisterBankInfo.h:154
¶ValueMapping(
const llvm::RegisterBankInfo::PartialMapping*
BreakDown,
unsigned int NumBreakDowns)
ValueMapping(
const llvm::RegisterBankInfo::PartialMapping*
BreakDown,
unsigned int NumBreakDowns)
Description
Initialize a ValueMapping with the given parameter.\p BreakDown needs to have a life time at least as long as this instance.
Declared at: llvm/include/llvm/CodeGen/RegisterBankInfo.h:159
Parameters
- const llvm::RegisterBankInfo::PartialMapping* BreakDown
- unsigned int NumBreakDowns
¶const llvm::RegisterBankInfo::PartialMapping*
begin() const
const llvm::RegisterBankInfo::PartialMapping*
begin() const
Description
Iterators through the PartialMappings.
Declared at: llvm/include/llvm/CodeGen/RegisterBankInfo.h:163
¶void dump() const
void dump() const
Description
Print this on dbgs() stream.
Declared at: llvm/include/llvm/CodeGen/RegisterBankInfo.h:181
¶const llvm::RegisterBankInfo::PartialMapping*
end() const
const llvm::RegisterBankInfo::PartialMapping*
end() const
Declared at: llvm/include/llvm/CodeGen/RegisterBankInfo.h:164
¶bool isValid() const
bool isValid() const
Description
Check if this ValueMapping is valid.
Declared at: llvm/include/llvm/CodeGen/RegisterBankInfo.h:171
¶bool partsAllUniform() const
bool partsAllUniform() const
Declared at: llvm/include/llvm/CodeGen/RegisterBankInfo.h:168
Returns
true if all partial mappings are the same size and register bank.
¶void print(llvm::raw_ostream& OS) const
void print(llvm::raw_ostream& OS) const
Description
Print this on \p OS;
Declared at: llvm/include/llvm/CodeGen/RegisterBankInfo.h:184
Parameters
¶bool verify(unsigned int MeaningfulBitWidth) const
bool verify(unsigned int MeaningfulBitWidth) const
Description
Verify that this mapping makes sense for a value of\p MeaningfulBitWidth.
Declared at: llvm/include/llvm/CodeGen/RegisterBankInfo.h:178
Parameters
- unsigned int MeaningfulBitWidth
Returns
True is the check was successful.