Beginner
Compilers & Programming Language Theory
Q16 / 100
What is dead code elimination?
Correct! Well done.
Incorrect.
The correct answer is B) A compiler optimization removing code that never executes (unreachable code) or whose result is never used (dead stores)
B
Correct Answer
A compiler optimization removing code that never executes (unreachable code) or whose result is never used (dead stores)
Explanation
DCE: unreachable code (after return, always-false conditions) and dead stores (x=5; x=10; — first assignment unused). DCE interacts with other optimizations; IR in SSA form makes DCE trivial.
Progress
16/100