Which of the following is machine independent optimization?
Machine Independent optimization: Loop optimization, Redundancy elimination, folding, Strength reduction, Deadlock elimination.
Machine Dependent optimization: Register allocation, Use of addressing modes, Peephole optimization.
Answer: D
Src: https://en.wikipedia.org/wiki/Optimizing_compiler
Machine independent optimization attempts to improve the intermediate code to get a better target code. The part of the code which is transformed here does not involve any absolute memory location or any CPU registers.
All of these are machine independent optimization.
Ref: https://www.javatpoint.com/machine-independent-optimization
64.3k questions
77.9k answers
244k comments
80.0k users