MachineOperand class ‐ Representation of each machine instruction operand.
Synopsis
Declared in <llvm/CodeGen/MachineOperand.h>
class MachineOperand;
Description
This class isn't a POD type because it has a private constructor, but its destructor must be trivial. Functions like MachineInstr::addOperand(), MachineRegisterInfo::moveOperands(), and MF::DeleteMachineInstr() depend on not having to call the MachineOperand destructor.
Enums
Name |
Member Functions
Name |
Description |
ChangeToBA ‐ Replace this operand with a new block address operand. |
|
ChangeToCPI ‐ Replace this operand with a new constant pool index operand. |
|
Replace this operand with an Instruction Reference. |
|
ChangeToES ‐ Replace this operand with a new external symbol operand. |
|
ChangeToFPImmediate ‐ Replace this operand with a new FP immediate operand of the specified value. If an operand is known to be an FP immediate already, the setFPImm method should be used. |
|
Replace this operand with a frame index. |
|
ChangeToGA ‐ Replace this operand with a new global address operand. |
|
ChangeToImmediate ‐ Replace this operand with a new immediate operand of the specified value. If an operand is known to be an immediate already, the setImm method should be used. |
|
ChangeToMCSymbol ‐ Replace this operand with a new MC symbol operand. |
|
ChangeToRegister ‐ Replace this operand with a new register operand of the specified value. If an operand is known to be an register already, the setReg method should be used. |
|
Replace this operand with a target index. |
|
clearParent ‐ Reset the parent pointer. |
|
clobbersPhysReg ‐ Returns true if this RegMask operand clobbers PhysReg. |
|
Return the offset from the symbol in this operand. This always returns 0 for ExternalSymbol operands. |
|
Returns the index of this operand in the instruction that it belongs to. |
|
getParent ‐ Return the instruction that this operand belongs to. |
|
getReg ‐ Returns the register number. |
|
getRegLiveOut ‐ Returns a bit mask of live‐out registers. |
|
getRegMask ‐ Returns a bit mask of registers preserved by this RegMask operand. |
|
getTargetIndexName ‐ If this MachineOperand is a TargetIndex that has a name, attempt to get the name. Returns nullptr if the TargetIndex does not have a name. Asserts if MO is not a TargetIndex. |
|
getType ‐ Returns the MachineOperandType for this operand. |
|
isBlockAddress ‐ Tests if this is a MO_BlockAddress operand. |
|
isCImm ‐ Test if this is a MO_CImmediate operand. |
|
isCPI ‐ Tests if this is a MO_ConstantPoolIndex operand. |
|
isFI ‐ Tests if this is a MO_FrameIndex operand. |
|
isFPImm ‐ Tests if this is a MO_FPImmediate operand. |
|
isGlobal ‐ Tests if this is a MO_GlobalAddress operand. |
|
Returns true if this operand is identical to the specified operand except for liveness related flags (isKill, isUndef and isDead). Note that this should stay in sync with the hash_value overload below. |
|
isImm ‐ Tests if this is a MO_Immediate operand. |
|
isJTI ‐ Tests if this is a MO_JumpTableIndex operand. |
|
isMBB ‐ Tests if this is a MO_MachineBasicBlock operand. |
|
isMetadata ‐ Tests if this is a MO_Metadata operand. |
|
isReg ‐ Tests if this is a MO_Register operand. |
|
isRegLiveOut ‐ Tests if this is a MO_RegisterLiveOut operand. |
|
isRegMask ‐ Tests if this is a MO_RegisterMask operand. |
|
isRenamable ‐ Returns true if this register may be renamed, i.e. it does not generate a value that is somehow read in a way that is not represented by the Machine IR (e.g. to meet an ABI or ISA requirement). This is only valid on physical register operands. Virtual registers are assumed to always be renamable regardless of the value of this field. |
|
isSymbol ‐ Tests if this is a MO_ExternalSymbol operand. |
|
isTargetIndex ‐ Tests if this is a MO_TargetIndex operand. |
|
Return true if this operand can validly be appended to an arbitrary operand list. i.e. this behaves like an implicit operand. |
|
|
|
readsReg ‐ Returns true if this operand reads the previous value of its register. A use operand with the <undef> flag set doesn't read its register. A sub‐register def implicitly reads the other parts of the register being redefined unless the <undef> flag is set. |
|
Change a def to a use, or a use to a def. |
|
Change the register this operand corresponds to. |
|
Sets value of register mask operand referencing Mask. The operand does not take ownership of the memory referenced by Mask, it must remain valid for the lifetime of the operand. See CreateRegMask(). Any physreg with a 0 bit in the mask is clobbered by the instruction. |
|
substPhysReg ‐ Substitute the current register with the physical register Reg, taking any existing SubReg into account. For instance, substPhysReg(%eax) will change %reg1024:sub_8bit to %al. |
|
substVirtReg ‐ Substitute the current register with the virtual subregister Reg:SubReg. Take any existing SubReg index into account, using TargetRegisterInfo to compose the subreg indices if necessary. Reg must be a virtual register, SubIdx can be 0. |
Static Member Functions
Name |
Description |
CreateRegMask ‐ Creates a register mask operand referencing Mask. The operand does not take ownership of the memory referenced by Mask, it must remain valid for the lifetime of the operand. |
|
clobbersPhysReg ‐ Returns true if this RegMask clobbers PhysReg. It is sometimes necessary to detach the register mask pointer from its machine operand. This static method can be used for such detached bit mask pointers. |
|
Returns number of elements needed for a regmask array. |
|
Print an IRSlotNumber. |
|
Print the offset with explicit +/‐ signs. |
|
Print a stack object reference. |
|
Print a subreg index operand. MO_Immediate operands can also be subreg idices. If it's the case, the subreg index name will be printed. MachineInstr::isOperandSubregIdx can be called to check this. |
|
Print a MCSymbol as an operand. |
|
Print operand target flags. |
Friends
Name |
Description |
MachineRegisterInfo ‐ Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc. |
|
Representation of each machine instruction. |
|
MachineOperand hash_value overload. |
Non-Member Functions
Name |
Description |
Get all register state flags from machine operand |
|
Return an iterator |
|
Return an iterator |
Created with MrDocs