Struct disassemble::ControlFlowGraph [] [src]

pub struct ControlFlowGraph {
    pub graph: Graph<BasicBlock, BasicBlockEdge>,
    pub entry_block: Option<NodeIndex>,
    pub block_finder: BTreeMap<Address, NodeIndex>,
}

A control flow graph.

Fields

The Graph that stores the actual ControlFlowGraph

The NodeIndex for the entry BasicBlock for this function.

Map an address to the corresponding basic block.

Methods

impl ControlFlowGraph
[src]

[src]

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.