The Gateway to Computer Science Excellence
+2 votes
969 views

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 by Veteran (432k points)
recategorized | 969 views
0
Only option A is true.

2 Answers

+5 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) 

by Loyal (7.4k points)
selected by
0
Clear answer.

Thanks.
+1 vote

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

Refer

by Boss (10.9k points)
+3
given question is wrong...the question should be 'which of the following statement is false"
Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,388 answers
198,575 comments
105,413 users