MachineRegisterInfo ‐ Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
Synopsis
Declared in <llvm/CodeGen/MachineRegisterInfo.h>
class MachineRegisterInfo;
Types
Name |
Description |
Observer notified when virtual registers are created or cloned. |
|
Pending VirtRegMap entry parsed from MIR for later initialization. |
|
All attributes(register class or bank and low‐level type) a virtual register can have. |
|
Forward declaration of the instruction def/use‐chain iterator. |
|
Forward declaration of the operand def/use‐chain iterator. |
Type Aliases
Name |
Description |
def_bundle_iterator/def_bundle_begin/def_bundle_end ‐ Walk all defs of the specified register, stepping by bundle. |
|
def_instr_iterator/def_instr_begin/def_instr_end ‐ Walk all defs of the specified register, stepping by MachineInst. |
|
def_iterator/def_begin/def_end ‐ Walk all defs of the specified register. |
|
Iterator over live‐in physical/virtual register pairs. |
|
reg_bundle_iterator/reg_bundle_begin/reg_bundle_end ‐ Walk all defs and uses of the specified register, stepping by bundle. |
|
Iterator over non‐debug defs and uses of a register, stepping by bundle. |
|
reg_instr_iterator/reg_instr_begin/reg_instr_end ‐ Walk all defs and uses of the specified register, stepping by MachineInstr. |
|
Iterator over non‐debug defs and uses of a register, stepping by MachineInstr. |
|
reg_iterator/reg_begin/reg_end ‐ Walk all defs and uses of the specified register. |
|
reg_nodbg_iterator/reg_nodbg_begin/reg_nodbg_end ‐ Walk all defs and uses of the specified register, skipping those marked as Debug. |
|
use_bundle_iterator/use_bundle_begin/use_bundle_end ‐ Walk all uses of the specified register, stepping by bundle. |
|
Iterator over non‐debug uses of a register, stepping by bundle. |
|
use_instr_iterator/use_instr_begin/use_instr_end ‐ Walk all uses of the specified register, stepping by MachineInstr. |
|
Iterator over non‐debug uses of a register, stepping by MachineInstr. |
|
use_iterator/use_begin/use_end ‐ Walk all uses of the specified register. |
|
use_nodbg_iterator/use_nodbg_begin/use_nodbg_end ‐ Walk all uses of the specified register, skipping those marked as Debug. |
Member Functions
Name |
Description |
|
Constructors |
|
MachineRegisterInfo is non‐assignable. |
EmitLiveInCopies ‐ Emit copies to initialize livein virtual registers into the given entry block. |
|
Attach |
|
addLiveIn ‐ Add the specified register as a live‐in. Note that it is an error to add the same register to the same set more than once. |
|
Record a VirtRegMap entry to be applied when VirtRegMap is initialized. |
|
addPhysRegsUsedFromRegMask ‐ Mark any registers not in RegMask as used. This corresponds to the bit mask attached to register mask operands. |
|
addRegAllocationHint ‐ Add a register allocation hint to the hints vector for VReg. |
|
Add register operand |
|
canReserveReg ‐ Returns true if PhysReg can be used as a reserved register. Any register can be reserved before freezeReservedRegs() is called. |
|
Clear kill flags on all uses of the given register. |
|
Clear all pending VirtRegMap entries. |
|
Clear the target‐independent register allocation hints for |
|
Remove all types associated to virtual registers (after instruction selection and constraining of all generic virtual registers). |
|
clearVirtRegs ‐ Remove all virtual registers (after physreg assignment). |
|
Create and return a new virtual register in the function with the same attributes as the given register. |
|
Constrain register class/bank and type of |
|
Constrain a virtual register to a common subclass with |
|
Copy pending VirtRegMap entries from another MachineRegisterInfo. |
|
Create and return a new generic virtual register with low‐level type |
|
Create a virtual register with no class, bank, or size assigned yet. |
|
|
|
Return an iterator to the first defining operand of |
|
Return an iterator to the first bundle that defines |
|
Return a range over all bundles that define |
|
def_empty ‐ Return true if there are no instructions defining the specified register (it may be live‐in). |
|
Return an iterator to the first instruction that defines |
|
Return a range over all instructions that define |
|
Return a range over all defining operands of |
|
Disables the register from the list of CSRs. I.e. the register will not appear as part of the CSR mask. |
|
Dump all uses of |
|
freezeReservedRegs ‐ Called by the register allocator to freeze the set of reserved registers before allocation begins. |
|
Returns list of callee saved registers. The function returns the updated CSR list (after taking into account registers that are disabled from the CSR list). |
|
Return the machine basic block in which the specified virtual register is defined, or null if it has no definition. This assumes SSA form. |
|
getLiveInPhysReg ‐ If VReg is a live‐in virtual register, return the corresponding live‐in physical register. |
|
getLiveInVirtReg ‐ If PReg is a live‐in physical register, return the corresponding live‐in virtual register. |
|
Return the machine function associated with this register info. |
|
Returns a mask covering all bits that can appear in lane masks of subregisters of the virtual register |
|
getNumVirtRegs ‐ Return the number of virtual registers created. |
|
Returns the defining operand if there is exactly one operand defining the specified register, otherwise nullptr. |
|
If the register has a single non‐Debug use, returns it; otherwise returns nullptr. |
|
If the register has a single non‐Debug instruction using the specified register, returns it; otherwise returns nullptr. |
|
Return the pending VirtRegMap entries waiting to be consumed. |
|
Get an iterator over the pressure sets affected by the virtual register or register unit. |
|
Return the strongest register allocation hint for a virtual register. |
|
getRegAllocationHints ‐ Return a reference to the vector of all register allocation hints for VReg. |
|
Return the register bank of |
|
Return the register bank of |
|
Return the register class of the specified virtual register. This shouldn't be used directly unless |
|
Return the register class of |
|
Return the register bank or register class of |
|
Return a reference to the frozen set of reserved registers. |
|
getSimpleHint ‐ same as getRegAllocationHint except it will only return a target independent hint. |
|
Return the target register info for this machine function. |
|
Get the low‐level type of |
|
Return the unique defining instruction of a virtual register, or null. |
|
Return the bit vector of physical registers marked used via regmasks. |
|
Returns register class or bank and low level type of |
|
Return the defining instruction of a virtual register in SSA form. |
|
Return the debug name of virtual register |
|
hasAtMostUses ‐ Return true if the given register has at most |
|
Return true if there is exactly one operand defining the specified register. |
|
hasOneNonDBGUse ‐ Return true if there is exactly one non‐Debug use of the specified register. |
|
hasOneNonDBGUse ‐ Return true if there is exactly one non‐Debug instruction using the specified register. Said instruction may have multiple uses. |
|
hasOneUse ‐ Return true if there is exactly one instruction using the specified register. |
|
Associate debug name |
|
invalidateLiveness ‐ Indicates that register liveness is no longer being tracked accurately. |
|
isAllocatable ‐ Returns true when PhysReg belongs to an allocatable register class and it hasn't been reserved. |
|
Returns true if PhysReg is unallocatable and constant throughout the function. Writing to a constant register has no effect. |
|
Return true if |
|
Return true if the specified register is modified in this function. |
|
Return true if the specified register is modified or read in this function. |
|
isReserved ‐ Returns true when PhysReg is a reserved register. |
|
Returns true when the given register unit is considered reserved. |
|
Return true when the machine function is in SSA form. |
|
Returns true if the updated CSR list was initialized and false otherwise. |
|
Indicate that the machine function is no longer in SSA form. |
|
Return an iterator to the beginning of the live‐in set. |
|
Return true if the live‐in set is empty. |
|
Return an iterator to the end of the live‐in set. |
|
Return the live‐in physical/virtual register pairs for this function. |
|
Mark DBG_VALUE uses of a register as undefined so they are deleted later. |
|
Move |
|
Notify all delegates that |
|
Notify all delegates that virtual register |
|
Recompute a legal super‐class for |
|
Return an iterator to the first def or use operand of |
|
Return an iterator to the first bundle that defs or uses |
|
Return an iterator to the first non‐debug bundle that defs or uses |
|
Return a range over all bundles that def or use |
|
reg_empty ‐ Return true if there are no instructions using or defining the specified register (it may be live‐in). |
|
Return an iterator to the first instruction that defs or uses |
|
Return an iterator to the first non‐debug instruction that defs or uses |
|
Return a range over all instructions that def or use |
|
Return an iterator to the first non‐debug def or use operand of |
|
Return a range over all non‐debug bundles that def or use |
|
reg_nodbg_empty ‐ Return true if the only instructions using or defining Reg are Debug instructions. |
|
Return a range over all non‐debug instructions that def or use |
|
Return a range over all non‐debug def and use operands of |
|
Return a range over all def and use operands of |
|
Remove register operand |
|
Replace all instances of FromReg with ToReg in the machine function. |
|
Mark a register as reserved so allocatable checks will reject it. |
|
reservedRegsFrozen ‐ Returns true after freezeReservedRegs() was called to ensure the set of reserved registers stays constant. |
|
Remove |
|
Sets the updated Callee Saved Registers list. Notice that it will override ant previously disabled/saved CSRs. |
|
Specify a register allocation hint for the given virtual register. |
|
Set the register bank to |
|
setRegClass ‐ Set the register class of the specified virtual register. |
|
Set the register class or register bank of |
|
Specify the preferred (target independent) register allocation hint for the specified virtual register. |
|
Set the low‐level type of |
|
|
|
Return true if subregister liveness tracking is enabled for this function. |
|
tracksLiveness ‐ Returns true when tracking register liveness accurately. (see MachineFUnctionProperties::Property description for details) |
|
updateDbgUsersToReg ‐ Update a collection of debug instructions to refer to the designated register. |
|
Return an iterator to the first use operand of |
|
Return an iterator to the first bundle that uses |
|
Return an iterator to the first non‐debug bundle that uses |
|
Return a range over all bundles that use |
|
use_empty ‐ Return true if there are no instructions using the specified register. |
|
Return an iterator to the first instruction that uses |
|
Return an iterator to the first non‐debug instruction that uses |
|
Return a range over all instructions that use |
|
Return an iterator to the first non‐debug use operand of |
|
Return a range over all non‐debug bundles that use |
|
use_nodbg_empty ‐ Return true if there are no non‐Debug instructions using the specified register. |
|
Return a range over all non‐debug instructions that use |
|
Return a range over all non‐debug use operands of |
|
Return a range over all use operands of |
|
Verify the sanity of the use list for Reg. |
|
Verify the use list of all registers. |
Static Member Functions
Name |
Description |
Return the end iterator for register defining‐bundle walks. |
|
Return the end iterator for register defining‐operand walks. |
|
Return the end iterator for register defining‐instruction walks. |
|
Return the end iterator for register def/use bundle walks. |
|
Return the end iterator for non‐debug register def/use bundle walks. |
|
Return the end iterator for register def/use operand walks. |
|
Return the end iterator for register def/use instruction walks. |
|
Return the end iterator for non‐debug register def/use instruction walks. |
|
Return the end iterator for non‐debug register def/use operand walks. |
|
Return the end iterator for register using‐bundle walks. |
|
Return the end iterator for non‐debug register using‐bundle walks. |
|
Return the end iterator for register use‐operand walks. |
|
Return the end iterator for register using‐instruction walks. |
|
Return the end iterator for non‐debug register using‐instruction walks. |
|
Return the end iterator for non‐debug register use‐operand walks. |
Friends
Name |
Description |
|
Forward declaration of the instruction def/use‐chain iterator. |
Forward declaration of the operand def/use‐chain iterator. |
Non-Member Functions
Name |
Description |
Try to constrain Reg to the specified register class. |
|
Match a unary predicate against a scalar/splat constant or build vector. |
|
Assuming the instruction |
|
Assuming the instruction |
Created with MrDocs