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

Discussion

Match each scope of optimisation with the region it considers.
List I
A. local
B. global
C. interprocedural
D. peephole
List II
1. several procedures together
2. one basic block
3. a short window of adjacent instructions
4. one whole procedure

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

Answer: C

Correct answer: A-2, B-4, C-1, D-3

Four scopes in increasing order of reach and cost. Peephole works over a short window of adjacent instructions; local optimisation over one basic block; global optimisation over a whole procedure, which is where data flow analysis becomes necessary; and interprocedural optimisation across several procedures at once.

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

Post your comment

Please log in or register to post a comment.