LLVM
8.0.1
|
Helper struct that represents how a value is partially mapped into a register. More...
#include "llvm/CodeGen/GlobalISel/RegisterBankInfo.h"
Public Member Functions | |
PartialMapping ()=default | |
PartialMapping (unsigned StartIdx, unsigned Length, const RegisterBank &RegBank) | |
Provide a shortcut for quickly building PartialMapping. More... | |
unsigned | getHighBitIdx () const |
void | dump () const |
Print this partial mapping on dbgs() stream. More... | |
void | print (raw_ostream &OS) const |
Print this partial mapping on OS ;. More... | |
bool | verify () const |
Check that the Mask is compatible with the RegBank. More... | |
Public Attributes | |
unsigned | StartIdx |
Number of bits at which this partial mapping starts in the original value. More... | |
unsigned | Length |
Length of this mapping in bits. More... | |
const RegisterBank * | RegBank |
Register bank where the partial value lives. More... | |
Helper struct that represents how a value is partially mapped into a register.
The StartIdx and Length represent what region of the orginal value this partial mapping covers. This can be represented as a Mask of contiguous bit starting at StartIdx bit and spanning Length bits. StartIdx is the number of bits from the less significant bits.
Definition at line 47 of file RegisterBankInfo.h.
|
default |
|
inline |
Provide a shortcut for quickly building PartialMapping.
Definition at line 64 of file RegisterBankInfo.h.
LLVM_DUMP_METHOD void RegisterBankInfo::PartialMapping::dump | ( | ) | const |
Print this partial mapping on dbgs() stream.
Definition at line 478 of file RegisterBankInfo.cpp.
References llvm::dbgs(), and print().
Referenced by getHighBitIdx(), llvm::RegisterBankInfo::OperandsMapper::getMRI(), llvm::RegisterBankInfo::ValueMapping::isValid(), and llvm::RegisterBankInfo::InstructionMapping::isValid().
|
inline |
Definition at line 70 of file RegisterBankInfo.h.
References dump(), print(), and verify().
Referenced by llvm::RegisterBankInfo::ValueMapping::verify().
void RegisterBankInfo::PartialMapping::print | ( | raw_ostream & | OS | ) | const |
Print this partial mapping on OS
;.
Definition at line 493 of file RegisterBankInfo.cpp.
Referenced by getHighBitIdx(), llvm::RegisterBankInfo::OperandsMapper::getMRI(), llvm::RegisterBankInfo::ValueMapping::isValid(), and llvm::RegisterBankInfo::InstructionMapping::isValid().
bool RegisterBankInfo::PartialMapping::verify | ( | ) | const |
Check that the Mask is compatible with the RegBank.
Indeed, if the RegBank cannot accomadate the "active bits" of the mask, there is no way this mapping is valid.
Definition at line 484 of file RegisterBankInfo.cpp.
References assert().
Referenced by llvm::applyMapping(), getHighBitIdx(), llvm::RegisterBankInfo::ValueMapping::isValid(), llvm::RegisterBankInfo::InstructionMapping::isValid(), and llvm::RegisterBankInfo::ValueMapping::verify().
unsigned llvm::RegisterBankInfo::PartialMapping::Length |
Length of this mapping in bits.
This is how many bits this partial mapping covers in the original value: from StartIdx to StartIdx + Length -1.
Definition at line 56 of file RegisterBankInfo.h.
Referenced by llvm::RegisterBankInfo::OperandsMapper::createVRegs(), llvm::RegisterBankInfo::getRegBank(), and hashPartialMapping().
const RegisterBank* llvm::RegisterBankInfo::PartialMapping::RegBank |
Register bank where the partial value lives.
Definition at line 59 of file RegisterBankInfo.h.
Referenced by llvm::RegisterBankInfo::OperandsMapper::createVRegs(), llvm::RegBankSelect::getAnalysisUsage(), llvm::RegisterBankInfo::getRegBank(), and hashPartialMapping().
unsigned llvm::RegisterBankInfo::PartialMapping::StartIdx |
Number of bits at which this partial mapping starts in the original value.
The bits are counted from less significant bits to most significant bits.
Definition at line 51 of file RegisterBankInfo.h.
Referenced by llvm::RegisterBankInfo::getRegBank(), hashPartialMapping(), and llvm::RegisterBankInfo::ValueMapping::verify().