The following are all machine independent optimisations EXCEPT
Answer: A
Correct answer: instruction selection to exploit an addressing mode of the target
An optimisation is machine independent if it can be applied to the intermediate code without knowing the target. Instruction selection is the opposite: it exists precisely to exploit a particular machine's instruction set and addressing modes.
The other three qualify. Common subexpression elimination, constant folding and dead code elimination all work on the structure of the computation itself and would improve the program on any target. The distinction is what makes a common intermediate representation worth having.
Please log in or register to report this question.