Which one of the following is FALSE?
2014
Which one of the following is FALSE?
- A.
A basic block is a sequence of instructions where control enters the sequence at the beginning and exits at the end
- B.
Available expression analysis can be used for common subexpression elimination
- C.
Live variable analysis can be used for dead code elimination
- D.
x = 4 * 5 ⇒ x = 20 is an example of common subexpression elimination
Attempted by 29 students.
Show answer & explanation
Correct answer: D
The question asks to identify the false statement about compiler optimizations. Option 3 incorrectly claims constant folding is an example of common subexpression elimination. Constant folding evaluates expressions at compile time, while CSE removes redundant calculations. Options 0, 1, and 2 correctly describe basic blocks, available expressions, and live variables respectively.
A video solution is available for this question — log in and enroll to watch it.