class RegisterBankInfo::InstructionMapping
Declaration
class RegisterBankInfo::InstructionMapping { /* full declaration omitted */ };Description
Helper class that represents how the value of an instruction may be mapped and what is the related cost of such mapping.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h:188
Method Overview
- public InstructionMapping(unsigned int ID, unsigned int Cost, const llvm::RegisterBankInfo::ValueMapping * OperandsMapping, unsigned int NumOperands)
- public InstructionMapping()
- public void dump() const
- public unsigned int getCost() const
- public unsigned int getID() const
- public unsigned int getNumOperands() const
- public const llvm::RegisterBankInfo::ValueMapping & getOperandMapping(unsigned int i) const
- public bool isValid() const
- public void print(llvm::raw_ostream & OS) const
- public void setOperandsMapping(const llvm::RegisterBankInfo::ValueMapping * OpdsMapping)
- public bool verify(const llvm::MachineInstr & MI) const
Methods
¶InstructionMapping(
unsigned int ID,
unsigned int Cost,
const llvm::RegisterBankInfo::ValueMapping*
OperandsMapping,
unsigned int NumOperands)
InstructionMapping(
unsigned int ID,
unsigned int Cost,
const llvm::RegisterBankInfo::ValueMapping*
OperandsMapping,
unsigned int NumOperands)Description
Constructor for the mapping of an instruction.\p NumOperands must be equal to number of all the operands of the related instruction. The rationale is that it is more efficient for the optimizers to be able to assume that the mapping of the ith operand is at the index i.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h:215
Parameters
- unsigned int ID
- unsigned int Cost
- const llvm::RegisterBankInfo::ValueMapping* OperandsMapping
- unsigned int NumOperands
¶InstructionMapping()
InstructionMapping()Description
Default constructor. Use this constructor to express that the mapping is invalid.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h:224
¶void dump() const
void dump() constDescription
Print this on dbgs() stream.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h:266
¶unsigned int getCost() const
unsigned int getCost() constDescription
Get the cost.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h:227
¶unsigned int getID() const
unsigned int getID() constDescription
Get the ID.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h:230
¶unsigned int getNumOperands() const
unsigned int getNumOperands() constDescription
Get the number of operands.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h:233
¶const llvm::RegisterBankInfo::ValueMapping&
getOperandMapping(unsigned int i) const
const llvm::RegisterBankInfo::ValueMapping&
getOperandMapping(unsigned int i) constDescription
Get the value mapping of the ith operand.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h:238
Parameters
- unsigned int i
¶bool isValid() const
bool isValid() constDescription
Check whether this object is valid. This is a lightweight check for obvious wrong instance.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h:253
¶void print(llvm::raw_ostream& OS) const
void print(llvm::raw_ostream& OS) constDescription
Print this on \p OS;
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h:269
Parameters
¶void setOperandsMapping(
const llvm::RegisterBankInfo::ValueMapping*
OpdsMapping)
void setOperandsMapping(
const llvm::RegisterBankInfo::ValueMapping*
OpdsMapping)Description
Set the mapping for all the operands. In other words, OpdsMapping should hold at least getNumOperands ValueMapping.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h:247
Parameters
- const llvm::RegisterBankInfo::ValueMapping* OpdsMapping
¶bool verify(const llvm::MachineInstr& MI) const
bool verify(const llvm::MachineInstr& MI) constDescription
Verifiy that this mapping makes sense for \p MI.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h:263
Parameters
- const llvm::MachineInstr& MI
Returns
True is the check was successful.