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

Discussion

Peephole optimisation is applied to the generated code in order to

  • A.verify that the generated code is free of syntax errors
  • B.remove local inefficiencies that the generator introduced
  • C.select the instructions for each intermediate operation
  • D.allocate registers to the values in the program

Answer: B

A window slides over the instructions and recognised patterns are replaced. It is cheap and catches redundancies that arise from generating each construct independently. Running it after every other pass costs very little and usually finds something.

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

Post your comment

Please log in or register to post a comment.