pub struct BasicBlock {
pub label: BlockId,
pub params: Vec<(Register, NativeType)>,
pub instructions: Vec<NativeInst>,
pub terminator: Option<NativeInst>,
}Expand description
A basic block in the native IR.
Fields§
§label: BlockIdThe block identifier.
params: Vec<(Register, NativeType)>Block parameters (for SSA phi-elimination).
instructions: Vec<NativeInst>The instructions in this block (excluding the terminator).
terminator: Option<NativeInst>The terminator instruction.
Implementations§
Source§impl BasicBlock
impl BasicBlock
Sourcepub fn successors(&self) -> Vec<BlockId>
pub fn successors(&self) -> Vec<BlockId>
Get the successor block IDs of this block.
Sourcepub fn instruction_count(&self) -> usize
pub fn instruction_count(&self) -> usize
Total number of instructions (including terminator).
Trait Implementations§
Source§impl Clone for BasicBlock
impl Clone for BasicBlock
Source§fn clone(&self) -> BasicBlock
fn clone(&self) -> BasicBlock
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BasicBlock
impl Debug for BasicBlock
Auto Trait Implementations§
impl Freeze for BasicBlock
impl RefUnwindSafe for BasicBlock
impl Send for BasicBlock
impl Sync for BasicBlock
impl Unpin for BasicBlock
impl UnsafeUnpin for BasicBlock
impl UnwindSafe for BasicBlock
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more