Difficulty: Medium
Correct Answer: creation of more optimal intermediate code (matrix) independent of the target machine
Explanation:
Introduction / Context:
Modern compilers typically divide optimization into two broad classes: machine-independent and machine-dependent. Machine-independent optimization operates on an intermediate representation (IR) and is agnostic of specific instruction sets, pipelines, or microarchitectural details. This question focuses on recognizing that distinction in the PL/I compilation pipeline.
Given Data / Assumptions:
Concept / Approach:
Machine-independent optimizations include constant folding, common subexpression elimination, dead code elimination, copy propagation, loop-invariant code motion, and strength reduction performed on IR. They improve efficiency regardless of the final hardware, whereas machine-dependent steps tune instruction selection, scheduling, and register allocation to a particular target.
Step-by-Step Solution:
Verification / Alternative check:
Compare outputs with and without optimization flags at the IR level; improvements are visible even before register allocation or instruction selection occur.
Why Other Options Are Wrong:
Common Pitfalls:
Conflating macro processing or parsing with optimization; assuming optimization must be tied to a specific CPU rather than performed generically on IR.
Final Answer:
creation of more optimal intermediate code (matrix) independent of the target machine.
Discussion & Comments