class RegisterBankInfo::OperandsMapper

Declaration

class RegisterBankInfo::OperandsMapper { /* full declaration omitted */ };

Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h:279

Method Overview

  • public OperandsMapper(llvm::MachineInstr & MI, const llvm::RegisterBankInfo::InstructionMapping & InstrMapping, llvm::MachineRegisterInfo & MRI)
  • public void createVRegs(unsigned int OpIdx)
  • public void dump() const
  • public const llvm::RegisterBankInfo::InstructionMapping & getInstrMapping() const
  • public llvm::MachineInstr & getMI() const
  • public llvm::MachineRegisterInfo & getMRI() const
  • public int getVRegs(unsigned int OpIdx, bool ForDebug = false) const
  • public void print(llvm::raw_ostream & OS, bool ForDebug = false) const
  • public void setVRegs(unsigned int OpIdx, unsigned int PartialMapIdx, llvm::Register NewVReg)

Methods

OperandsMapper(
    llvm::MachineInstr& MI,
    const llvm::RegisterBankInfo::
        InstructionMapping& InstrMapping,
    llvm::MachineRegisterInfo& MRI)

Description

Create an OperandsMapper that will hold the information to apply \p InstrMapping to \p MI.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h:322

Parameters

llvm::MachineInstr& MI
const llvm::RegisterBankInfo::InstructionMapping& InstrMapping
llvm::MachineRegisterInfo& MRI

void createVRegs(unsigned int OpIdx)

Description

Create as many new virtual registers as needed for the mapping of the \p OpIdx-th operand. The number of registers is determined by the number of breakdown for the related operand in the instruction mapping. The type of the new registers is a plain scalar of the right size. The proper type is expected to be set when the mapping is applied to the instruction(s) that realizes the mapping.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h:349

Parameters

unsigned int OpIdx

void dump() const

Description

Print this operands mapper on dbgs() stream.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h:379

const llvm::RegisterBankInfo::InstructionMapping&
getInstrMapping() const

Description

The final mapping of the instruction.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h:331

llvm::MachineInstr& getMI() const

Description

@ { The MachineInstr being remapped.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h:328

llvm::MachineRegisterInfo& getMRI() const

Description

The MachineRegisterInfo we used to realize the mapping.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h:334

int getVRegs(unsigned int OpIdx,
             bool ForDebug = false) const

Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h:376

Parameters

unsigned int OpIdx
bool ForDebug = false

void print(llvm::raw_ostream& OS,
           bool ForDebug = false) const

Description

Print this operands mapper on \p OS stream.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h:382

Parameters

llvm::raw_ostream& OS
bool ForDebug = false

void setVRegs(unsigned int OpIdx,
              unsigned int PartialMapIdx,
              llvm::Register NewVReg)

Description

Set the virtual register of the \p PartialMapIdx-th partial mapping of the OpIdx-th operand to \p NewVReg.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h:361

Parameters

unsigned int OpIdx
unsigned int PartialMapIdx
llvm::Register NewVReg