Block 1
Block 2
Block 3
Block 4
Basic Blocks: Example
3/43
LEADER
(first statement)
LEADER
(label)
LEADER
(follows a goto
statement)
LEADER
(label &
follows a goto
statement)
sum := 0;
i := 0;
L1:
if i >= n goto L2;
sum := sum + a[i];
i := i + 1;
goto L1;
L2:
result := sum