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

Discussion

Global value numbering differs from local value numbering in that it

  • A.works across the whole procedure rather than one block
  • B.assigns numbers to variables rather than to expressions
  • C.requires the program to be in static single assignment form
  • D.operates on the source text rather than intermediate code

Answer: A

Correct answer: works across the whole procedure rather than one block

Local value numbering assigns a number to each distinct computed value within a block and reuses it where the same value recurs. The global version extends this across the whole procedure, which requires reasoning about values flowing along different control paths - commonly done over static single assignment form, though that is a convenience rather than a requirement.

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

Post your comment

Please log in or register to post a comment.