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

Discussion

Which of the following is NOT a task of the code generator?

  • A.scheduling the instructions to suit the target pipeline
  • B.checking that every identifier has been declared
  • C.selecting the instructions that implement each operation
  • D.allocating the machine registers to the values in play

Answer: B

Correct answer: checking that every identifier has been declared

Declaration checking belongs to semantic analysis and is complete long before code generation begins - the generator assumes a correct program. Instruction selection, register allocation and scheduling are its three tasks, and all three are about how to express a program already known to be valid.

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

Post your comment

Please log in or register to post a comment.