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

Discussion

A compiler pass that reads the intermediate code and writes improved intermediate code is

  • A.the same thing as a pass of the assembler over its input
  • B.an optimisation pass operating within the middle of the compiler
  • C.necessarily the final pass to run before the executable is produced
  • D.part of the lexical analysis of the original source program

Answer: B

Correct answer: an optimisation pass operating within the middle of the compiler

Reading intermediate code and writing intermediate code is the signature of an optimisation pass: the representation is unchanged and only the quality of the program improves.

Such passes are typically run several times and in sequence, since one transformation exposes opportunities for another. They sit between the front and back ends, so they are neither the last pass before the executable nor part of lexical analysis, and they have nothing to do with the assembler.

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

Post your comment

Please log in or register to post a comment.