10,059 views

Peephole optimization is form of

1. Loop optimization
2. Local optimization
3. Constant folding
4. Data flow analysis

1 comment

It is a form of optimization that is done on a segment of generated code.

It is Local Optimization (b)

Okay, so finaly we can conclude that if any answer selected(only 1) by you or any other Veteran, is final answer.
Right Arjun Sir ?

And please provide me a reference(for study purpose) for these type of questions.
yes, but except on really confusing questions I do not want anyone to rely on answer being selected. Ideally one should know which is the correct answer. The whole point of answer being given is for verification and may be to give missing points. This one for example can be answered not by even reading the text boo but by going through the "contents page" of compiler text book. For compilers there is only 1 standard book - the Dragon book.
Okay. Thank You Arjun Sir

Common techniques applied in peephole optimization:

• Constant folding – Evaluate constant subexpressions in advance.
• Strength reduction – Replace slow operations with faster equivalents.
• Null sequences – Delete useless operations.
• Combine operations – Replace several operations with one equivalent.
• Algebraic laws – Use algebraic laws to simplify or reorder instructions.
• Special case instructions – Use instructions designed for special operand cases.

https://en.wikipedia.org/wiki/Peephole_optimization

by

Peephole optimization is form of optimization which is performed to a code which is local.

hence final answer is B)Local Optimization

according to ur answer option c would have been answer but b is given