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

Discussion

Arrange these steps of partitioning three address code into basic blocks.
1. mark each jump target and each instruction after a jump
2. identify the leaders among the instructions
3. form a block from each leader up to the next leader
4. take the first instruction of the program as a leader

  • A.4 - 2 - 1 - 3
  • B.2 - 1 - 4 - 3
  • C.2 - 4 - 1 - 3
  • D.3 - 1 - 4 - 2

Answer: C

The leaders are found first by the two rules, and each block then runs from one leader to just before the next. The partition is unique for a given instruction sequence. Two compilers applying the rules will always agree on the blocks.

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

Post your comment

Please log in or register to post a comment.