diff options
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp b/llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp index e63f561b7e7..262459f00c0 100644 --- a/llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp +++ b/llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp @@ -390,6 +390,22 @@ void RegisterBankInfo::ValueMapping::verify(unsigned ExpectedBitWidth) const { assert(ValueMask.isAllOnesValue() && "Value is not fully mapped"); } +void RegisterBankInfo::ValueMapping::dump() const { + print(dbgs()); + dbgs() << '\n'; +} + +void RegisterBankInfo::ValueMapping::print(raw_ostream &OS) const { + OS << "#BreakDown: " << BreakDown.size() << " "; + bool IsFirst = true; + for (const PartialMapping &PartMap : BreakDown) { + if (!IsFirst) + OS << ", "; + OS << '[' << PartMap << ']'; + IsFirst = false; + } +} + void RegisterBankInfo::InstructionMapping::setOperandMapping( unsigned OpIdx, unsigned MaskSize, const RegisterBank &RegBank) { // Build the value mapping. |