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

Discussion

Splitting a procedure into basic blocks is worth doing before optimisation because

  • A.each block can then be compiled by a separate pass of the compiler
  • B.the blocks can be reordered freely without affecting the program
  • C.a block always corresponds to a single statement of the source
  • D.reasoning within a block needs no knowledge of control flow at all

Answer: D

Since control enters a block only at the top and leaves only at the bottom, every instruction runs whenever the block does. That guarantee is what makes local transformations safe without any data flow analysis, and it is why the partition is computed before anything else.

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

Post your comment

Please log in or register to post a comment.