Struct disassemble::ControlFlowGraph
[−]
[src]
pub struct ControlFlowGraph<'f> { pub graph: Graph<BasicBlock<'f>, BasicBlockEdge>, pub entry_block: Option<NodeIndex>, pub block_finder: BTreeMap<Address, NodeIndex>, }
Fields
graph | The |
entry_block | The |
block_finder | Map an address to the corresponding basic block. |
Methods
impl<'f> ControlFlowGraph<'f>
fn new(instructions: &'f [Box<Instruction>]) -> Self
[−]
Build the ControlFlowGraph from the instructions
.
This is conducted in a 2 step process:
- First, each instruction is examined to identify block boundaries.
- Then, we go through each instruction again, looking for the previously identified block boundaries and build the edges.
This two step process prevents us from having to construct and then subsequently split blocks as we find backward edges.