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

Discussion

Rematerialisation as an alternative to spilling means

  • A.extending the lifetime of the value across the whole procedure
  • B.colouring the interference graph with one additional colour
  • C.recomputing a cheap value instead of storing and reloading it
  • D.moving the value into a different register of the machine

Answer: C

A constant or a simple address computation often costs less to recompute than to load from memory. The allocator marks such values as candidates before it starts spilling. The decision depends on the relative cost of a load on the target machine.

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

Post your comment

Please log in or register to post a comment.