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

Discussion

Next use information is computed by scanning a basic block

  • A.in the order of the variables in the symbol table
  • B.backwards from the last instruction to the first
  • C.forwards from the first instruction to the last
  • D.in the order the instructions were originally written

Answer: B

Correct answer: backwards from the last instruction to the first

Next use is a statement about the future, so it can only be computed by working backwards from the end of the block. Scanning in reverse, each instruction records what it needs and then updates the information for the instruction before it - the same technique liveness analysis uses.

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

Post your comment

Please log in or register to post a comment.