Basic block: The collection of 3AC statements from the leader to the next leader without including the next leader is known as the basic block.
Steps to find the basic blocks:
- Identify the leader first. (The first statement of 3AC is the leader.)
- The address of conditional, unconditional goto is the leader. (target location of goto)
- immediate next line of goto is the leader.
Now construct the basic block from leader to line before the next leader.
In the given 3AC $7$ leaders are there: $1,3,4,10,11,13,15$
There are $7$ basic block are there:
- Block $B_1$: statement $1-2$
- Block $B_2$: statement $3$
- Block $B_3$: statement $4-9$
- Block $B_4$: statement $10$
- Block $B_5$: statement $11-12$
- Block $B_6$: statement $13-14$
- Block $B_7$: statement $15$
So the total number of basic blocks is $7$ and the largest basic block is $B_3$ which contains a total of $6$ instruction.
Correct option is $(D)$
Ref: Basic Block