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

Discussion

State whether the following is true or false.
A code generator may assume the target machine has an unlimited supply of registers.

  • A.True
  • B.False
  • C.True only at large scales
  • D.False only at small scales

Answer: B

Correct answer: False

The machine has whatever registers it has, and running out is the central difficulty of the back end. An intermediate representation may assume unlimited virtual registers, but the code generator must map them onto the real set and spill to memory where it cannot - which is exactly what register allocation is.

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

Post your comment

Please log in or register to post a comment.