













Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!














Unreachable and dead-code elimination (^) Dead-code elimination: (^) eliminate executable code that has no effect on the computation (^) E.g., multiple stores of the same value to the same register with no intervening stores of different values (^) Unreachable code elimination: (^) remove code that is not reachable along any control-flow path
Merge block L2 into block L1. Note that an unconditional branch to L5 must be inserted to reflect the fall-through between L and L5 in the original program
(^) Eliminate branch-to-branch transfers: (^) An unconditional branch to an unconditional branch can be replaced by a branch to the latter’s target (^) A conditional branch to an unconditional branch can be replaced by a conditional branch to the latter’s target (^) An unconditional branch to a conditional branch can be replaced by the conditional branch (^) A conditional branch to a conditional branch can be replaced by a conditional branch with the former’s test and the latter’s target (^) Latter condition must be true whenever the former is (^) Example: if a = 0 goto L1 if a = 0 goto L .... L1: if a >= 0 goto L