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

Discussion

A phi function in static single assignment form is needed

  • A.at the entry to every procedure in the program
  • B.whenever an expression contains more than two operands
  • C.where control flow paths carrying different versions of a name meet
  • D.wherever a variable happens to be assigned more than once in a block

Answer: C

Correct answer: where control flow paths carrying different versions of a name meet

Static single assignment gives every assignment a distinct name, which works within straight-line code but fails at a join, where the value could have come from either path. The phi function is placed at that join to select between the incoming versions, which restores the single-assignment property.

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

Post your comment

Please log in or register to post a comment.