GATE 2014 CS (CS1) – Question 27
Which compiler statement is FALSE?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (D) Replacing x = 4 * 5 by x = 20 is common-subexpression elimination.
Explanation
Replacing4×5 by20 evaluates a constant expression at compile time and is constant folding. Common-subexpression elimination reuses an already computed expression instead of recomputing it. Therefore **D** is false; available expressions and liveness support the other optimisations described.