Description

BasicBlock represents an SSA basic block.

The final element of Instrs is always an explicit transfer of control (If, Jump, Return, or Panic).

A block may contain no Instructions only if it is unreachable, i.e., Preds is nil. Empty blocks are typically pruned.

BasicBlocks and their Preds/Succs relation form a (possibly cyclic) graph independent of the SSA Value graph: the control-flow graph or CFG. It is illegal for multiple edges to exist between the same pair of blocks.

Each BasicBlock is also a node in the dominator tree of the CFG. The tree may be navigated using Idom()/Dominees() and queried using Dominates().

The order of Preds and Succs is significant (to Phi and If instructions, respectively).