A sequence of machine instructions forming one basic block.
Synopsis
Declared in <llvm/CodeGen/MachineBasicBlock.h>
class MachineBasicBlock
: public ilist_node_with_parent<MachineBasicBlock, MachineFunction>
Base Classes
Name |
Description |
|
An ilist node that can access its parent list. |
Types
Name |
Description |
Pair of physical register and lane mask. This is not simply a std::pair typedef because the members should be named clearly as they both have an integer type. |
|
Analyses optionally updated when splitting a critical edge. |
|
Input iterator over registers potentially live out of this block. |
Type Aliases
Name |
Description |
Const iterator over individual machine instructions (ignoring bundles). |
|
Const range over individual machine instructions (ignoring bundles). |
|
Const bundle‐aware iterator over machine instructions. |
|
Const iterator over CFG predecessor MachineBasicBlocks. |
|
Const reverse iterator over predecessor MachineBasicBlocks. |
|
Const reverse iterator over individual machine instructions. |
|
Const bundle‐aware reverse iterator over machine instructions. |
|
Const iterator over CFG successor MachineBasicBlocks. |
|
Const reverse iterator over successor MachineBasicBlocks. |
|
Iterator over individual machine instructions (ignoring bundles). |
|
Range over individual machine instructions (ignoring bundles). |
|
Bundle‐aware iterator over machine instructions. |
|
Const iterator over live‐in register/lane pairs. |
|
Iterator over CFG predecessor MachineBasicBlocks. |
|
Reverse iterator over predecessor MachineBasicBlocks. |
|
Reverse iterator over individual machine instructions (ignoring bundles). |
|
Bundle‐aware reverse iterator over machine instructions. |
|
Iterator over CFG successor MachineBasicBlocks. |
|
Reverse iterator over successor MachineBasicBlocks. |
Enums
Name |
Description |
Possible outcome of a register liveness query to computeRegisterLiveness() |
|
Bit flags selecting optional details for printName. |
Member Functions
Name |
Description |
Given a machine basic block that branched to 'Old', change the code and CFG so that it branches to 'New' instead. |
|
Return the first instruction after |
|
Return the first instruction after |
|
|
|
|
|
Add |
|
Add |
|
Return the last instruction in the block (bundle‐aware). |
|
|
|
Return true if this block can fall through to the next layout block. |
|
Return true if successor probabilities match the equal‐probability default, so MIR printing can omit them. |
|
Return true if the edge from this block to |
|
Remove all instructions from this basic block without deleting the block. |
|
Remove the reference to the underlying IR BasicBlock. This is for reduction tools and should generally not be used. |
|
|
|
Return whether physical register |
|
Copy a successor (and any probability info) from original block to this block's. Uses an iterator into the original blocks successors. |
|
Dump this machine basic block to stderr for debugging. |
|
Return true if this block contains no instructions. |
|
|
|
|
|
This method unlinks 'this' from the containing function and deletes it. |
|
Remove an instruction from the instruction list and delete it. |
|
Find and return the merged DebugLoc of the branch instructions of the block. Return UnknownLoc if there is none. |
|
|
|
|
|
Return the first instruction in the block (bundle‐aware). |
|
Retrieves the BasicBlock which corresponds to this MachineBasicBlock. |
|
Return alignment of the basic block. |
|
For analyses, blocks have a more stable number. |
|
Return the optional unique basic‐block ID assigned to this block. |
|
Return the original LLVM IR basic block, or null if there is none. |
|
Get the clobber mask for the start of this basic block. Funclets use this to prevent register allocation across funclet transitions. |
|
Return the call frame size on entry to this basic block. |
|
Return the Windows EH Continuation Symbol for this basic block. |
|
Get the clobber mask for the end of the basic block. |
|
Returns the MCSymbol marking the end of this basic block. |
|
Return the fallthrough block if control can fall off this block's end. |
|
Same getFirstTerminator but it ignores bundles and return an instr_iterator instead. |
|
|
|
|
|
|
|
Find the first terminator by scanning forward from the block start. |
|
Return a formatted string to identify this block and its parent function. |
|
Return the optional irreducible loop header weight for this block. |
|
|
|
Return the underlying live‐in register/lane vector. |
|
Return the logical fallthrough successor, by branch or layout fallthrough. |
|
Return the maximum amount of padding allowed for aligning the basic block. |
|
Return the name of the corresponding LLVM basic block, or an empty string. |
|
Get the next node, or |
|
MachineBasicBlocks are uniquely numbered at the function level, unless they're not in a MachineFunction yet, in which case this will return ‐1. |
|
|
|
|
|
Returns the section ID of this basic block. |
|
|
|
|
|
Return the probability of the CFG edge from this block to |
|
Return the MCSymbol for this basic block. |
|
Return true if this block's address is taken outside ordinary CFG uses. |
|
Return true if any successor of this block is an EH pad. |
|
Test whether this block must have its label emitted. |
|
Check if there is a name of corresponding LLVM basic block. |
|
Return true if any of the successors have probabilities attached to them. |
|
|
|
Insert MI into the instruction list after I. |
|
Insert MI after I, or after I's bundle if I is bundled. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns true if this block begins any section. |
|
Returns true if this is the entry block of a cleanup funclet. |
|
Returns true if this is a target of Windows EH Continuation Guard. |
|
Returns true if this is the entry block of an EH funclet. |
|
Returns true if the block is a landing pad. That is this basic block is entered via an exception handler. |
|
Returns true if this is the entry block of an EH scope, i.e., the block that used to have a catchpad or cleanuppad instruction in the LLVM IR. |
|
Convenience function that returns true if the bock ends in a EH scope return instruction. |
|
Returns true if this block ends any section. |
|
Returns true if this is the entry block of the function. |
|
Test whether this block is the target of an IR BlockAddress. (There can more than one MBB associated with an IR BB where the address is taken.) |
|
Returns true if this is the indirect dest of an INLINEASM_BR. |
|
Return true if |
|
Returns true if it is legal to hoist instructions into this block. |
|
Return true if the specified register is in the live in set. |
|
Return true if this block's machine address is taken for non‐CFG uses. |
|
Return true if the specified MBB is a predecessor of this block. |
|
Convenience function that returns true if the block ends in a return instruction. |
|
Return true if the specified MBB is a successor of this block. |
|
Return an iterator to the beginning of the live‐in register list. |
|
Return a live‐in begin iterator without verifying liveness accuracy. |
|
Return true if this block has no live‐in registers. |
|
Return an iterator to the end of the live‐in register list. |
|
Return a range over this block's live‐in registers. |
|
Return live‐in registers without verifying that liveness data is current. |
|
Return a begin iterator over registers potentially live out of this block. |
|
Return the past‐the‐end live‐out iterator for this block. |
|
Return a range over registers potentially live out of this block. |
|
Return true if this block may be targeted by an INLINEASM_BR. |
|
Move this block after |
|
Move this block before |
|
Normalize successor probabilities so they sum to one. |
|
|
|
Remove and destroy the last instruction in this block. |
|
Remove and destroy the first instruction in this block. |
|
|
|
Return true if this block has no CFG predecessors. |
|
|
|
|
|
|
|
Return the number of CFG predecessors. |
|
|
|
|
|
Print this block as a MIR operand (for example, |
|
Print this block's name to |
|
Append instruction |
|
|
|
Remove the unbundled instruction from the instruction list without deleting it. |
|
This method unlinks 'this' from the containing function, and returns it, but does not delete it. |
|
|
|
Remove |
|
Remove all PHI incoming values that refer to predecessor |
|
|
|
Remove the possibly bundled instruction from the instruction list without deleting it. |
|
|
|
Update all phi nodes in this basic block to refer to basic block |
|
Replace successor OLD with NEW and update probability info. |
|
|
|
|
|
Returns true if this and MBB belong to the same section. |
|
Set this block to reflect that it corresponds to an IR‐level basic block with a BlockAddress. |
|
|
|
Set this block's analysis number to |
|
Sets the fixed BBID of this basic block. |
|
Set the call frame size on entry to this basic block. |
|
Record the irreducible loop header weight copied from the IR basic block. |
|
Mark whether this block is the first in its basic block section. |
|
Indicates if this is the entry block of a cleanup funclet. |
|
Indicates if this is a target of Windows EH Continuation Guard. |
|
Indicates if this is the entry block of an EH funclet. |
|
Indicates the block is a landing pad. That is this basic block is entered via an exception handler. |
|
Indicates if this is the entry block of an EH scope, i.e., the block that that used to have a catchpad or cleanuppad instruction in the LLVM IR. |
|
Mark whether this block is the last in its basic block section. |
|
Indicates if this is the indirect dest of an INLINEASM_BR. |
|
Set this block to reflect that, regardless how we flow to it, we need its label be emitted. |
|
Mark that this block's machine address is taken for non‐CFG uses. |
|
Set the maximum amount of padding allowed for aligning the basic block |
|
Set this block's dense function‐level number to |
|
Sets the section ID for this basic block. |
|
Set successor probability of a given iterator. |
|
Return the number of instructions in this block (including debug instrs). |
|
Return true if the non‐debug instruction count exceeds |
|
Sort and unique the LiveIns vector for cheaper membership tests. |
|
|
|
Split this block after |
|
Split the old successor into old plus new and updates the probability info. |
|
|
|
Return true if this block has no CFG successors. |
|
|
|
|
|
|
|
Return the number of CFG successors. |
|
|
|
Returns true if the original IR terminator is an |
|
|
|
Transfers all the successors from MBB to this machine basic block (i.e., copies all the successors FromMBB and remove all the successors from FromMBB). |
|
Transfers all the successors, as in transferSuccessors, and update PHI operands in the successor blocks which refer to FromMBB to refer to this. |
|
Update terminators after a change to this block's layout. |
|
Validate successors' probabilities and check if the sum of them is approximate one. This only works in DEBUG mode. |
Static Member Functions
Name |
Description |
Return the pointer‐to‐member used by MachineInstr::getNextNode(). |
Friends
Name |
Description |
|
Callback traits notifying a MachineFunction when MBBs enter or leave it. |
Analysis that provides relative branch probabilities for CFG edges between machine basic blocks. |
|
Representation of machine code for a single LLVM IR function. |
|
Callbacks do nothing by default in iplist and ilist. |
Non-Member Functions
Name |
Description |
Insert a new instruction before |
|
Insert a new instruction before |
|
Insert a new instruction before |
|
This version of the builder builds a DBG_VALUE, DBG_INSTR_REF, or DBG_VALUE_LIST intrinsic for a machine operand and inserts it at position I. |
|
Insert a new instruction before |
|
Insert a new instruction with a destination register before |
|
Insert a new instruction with a destination register before |
|
Insert a new instruction with a destination register before |
|
Append a new instruction with a destination register to |
|
This version of the builder builds a DBG_VALUE intrinsic for either a value in a register or a register‐indirect address and inserts it at position I. |
|
This version of the builder inserts the newly‐built instruction at the end of the given MachineBasicBlock, and does NOT take a destination register. |
|
Insert a new instruction with a destination register before |
|
Peels a single block loop. |
|
Adds registers contained in |
|
Clone a DBG_VALUE whose value has been spilled to FrameIndex. |
|
Clone a DBG_VALUE after spilling the given operands to |
|
Finalize a machine instruction bundle from FirstMI to LastMI (exclusive). |
|
Finalize a machine instruction bundle whose end is marked by InsideBundle. |
|
Find the split point at which to splice the end of BB into its success stack protector check machine basic block. |
|
Compute EH scope membership for each basic block in a machine function. |
|
Guess likely successors of a machine basic block from its operands. |
|
Return the instructions in machine basic block |
|
Return an iterator to the first CFG predecessor of |
|
Return the end iterator for CFG predecessors of |
|
Return the number of CFG predecessors of |
|
Return the CFG predecessors of |
|
Print a machine basic block reference for use in diagnostics and dumps. |
|
Recomputes dead and kill flags in |
|
Returns true if machine basic block |
|
Returns true if machine basic block |
|
Compute a stable hash of machine basic block |
|
Return an iterator to the first CFG successor of |
|
Return the end iterator for CFG successors of |
|
Return the number of CFG successors of |
|
Return the CFG successors of machine basic block |
Created with MrDocs