Struct disassemble::BasicBlock
[−]
[src]
pub struct BasicBlock<'f> { pub id: usize, pub name: Option<String>, pub instructions: Vec<&'f Box<Instruction>>, pub in_edges: Vec<BasicBlockEdge<'f>>, pub out_edges: Vec<BasicBlockEdge<'f>>, }
A basic block is a sequence of instructions with no inward-bound branches except to the entry point and no outward-bound branches except at the exit.
Fields
id: usize
The ID # for this basic block. This is artificial information and not something from the disassembly.
name: Option<String>
The name of the basic block. Not all blocks have meaningful names.
instructions: Vec<&'f Box<Instruction>>
The instructions within this basic block.
in_edges: Vec<BasicBlockEdge<'f>>
The basic blocks that point to this one.
out_edges: Vec<BasicBlockEdge<'f>>
The basic blocks which can be exited to from this one.
Methods
impl<'f> BasicBlock<'f>
[src]
fn new(id: usize, name: Option<&str>) -> Self
Construct a new BasicBlock
.
fn add_in_edge(&'f mut self, bb: &'f BasicBlock<'f>, edge_type: EdgeType)
Add an edge that points to this basic block.
fn add_out_edge(&'f mut self, bb: &'f BasicBlock<'f>, edge_type: EdgeType)
Add an edge that points from this basic block to another.