Finding Basic Blocks
Basic blocks are easily found by a compiler while processing a program.
A leader is the first statement of a basic block:
A basic block is a leader and successive statements up to the next leader.
Note that branch statements themselves do not appear in basic blocks, although the computation of the condition part of a conditional branch will be included.
In a graph representation of a program, basic blocks are the nodes of the graph, and branches are the arcs between nodes.