Machine-translated by Google. Questions are authored in English.
Top

Discussion

The following are all loop optimisations EXCEPT

  • A.peephole replacement of a jump to a jump
  • B.loop invariant code motion
  • C.induction variable strength reduction
  • D.loop unrolling

Answer: A

The first three all exploit the repeated structure of a loop. Peephole optimisation examines a short window of adjacent instructions and knows nothing about loops at all. It is nonetheless one of the cheapest passes for the improvement it yields.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.