Expand description

A control flow graph represented as mappings of basic blocks to their predecessors and successors.

Successors are represented as basic blocks while predecessors are represented by basic blocks. Basic blocks are denoted by tuples of block and branch/jump instructions. Each predecessor tuple corresponds to the end of a basic block.

    Block0:
        ...          ; beginning of basic block

        ...

        brif vx, Block1, Block2 ; end of basic block

    Block1:
        jump block3

Here Block1 and Block2 would each have a single predecessor denoted as (Block0, brif), while Block3 would have a single predecessor denoted as (Block1, jump block3).

Structs

  • A basic block denoted by its enclosing Block and last instruction.
  • The Control Flow Graph maintains a mapping of blocks to their predecessors and successors where predecessors are basic blocks and successors are basic blocks.
  • An iterator over block predecessors. The iterator type is BlockPredecessor.

Type Aliases

  • An iterator over block successors. The iterator type is Block.