in Compiler Design recategorized
3,163 views
4 votes
4 votes

Which of the following comment about peep-hole optimization is true?

  1. It is applied to small part of the code and applied repeatedly
  2. It can be used to optimize intermediate code 
  3. It can be applied to a portion of the code that is not contiguous
  4. It is applied in symbol table to optimize the memory requirements.
in Compiler Design recategorized
by
3.2k views

1 comment

Only option A is true.
0
0

2 Answers

8 votes
8 votes
Best answer

Acc to Aho Ullman book, PeepHole Optimization is done by examining a sliding window of target instructions(called the peephole) and replacing instruction sequences within the peephole by a faster sequence. It can be applied directly after Intermediate Code Generation to improve the intermediate representation. The code in the peephole need not be contiguous , although some implementations do require this.

So, options A, B and C are true. Only D is false. (Possible typo in question) 

selected by

1 comment

Clear answer.

Thanks.
0
0
1 vote
1 vote

I think both (a) and (b) are true.

Refer

by

1 comment

given question is wrong...the question should be 'which of the following statement is false"
3
3
Answer:

Related questions