10 votes 10 votes Peephole optimization is form of Loop optimization Local optimization Constant folding Data flow analysis Compiler Design compiler-design code-optimization isro2016 + – ManojK asked Jul 4, 2016 ManojK 11.9k views answer comment Share Follow See 1 comment See all 1 1 comment reply smsubham commented Mar 28, 2020 reply Follow Share Copy of UGC Net Question https://gateoverflow.in/335636/ugcnet-dec2006-ii-35 0 votes 0 votes Please log in or register to add a comment.
Best answer 13 votes 13 votes It is a form of optimization that is done on a segment of generated code. It is Local Optimization (b) vinay270490 answered Jul 4, 2016 • selected Jul 4, 2016 by Arjun vinay270490 comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments Devwritt commented Nov 10, 2016 reply Follow Share 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. 0 votes 0 votes Arjun commented Nov 10, 2016 reply Follow Share 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. 1 votes 1 votes Devwritt commented Nov 10, 2016 reply Follow Share Okay. Thank You Arjun Sir 0 votes 0 votes Please log in or register to add a comment.
6 votes 6 votes 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. Address mode operations – Use address modes to simplify code. https://en.wikipedia.org/wiki/Peephole_optimization omveer answered Aug 24, 2016 omveer comment Share Follow See all 3 Comments See all 3 3 Comments reply LavTheRawkstar commented Nov 10, 2016 reply Follow Share https://gateoverflow.in/80097/global-data-flow-analysis-is-_______#a80554 0 votes 0 votes LavTheRawkstar commented Nov 10, 2016 reply Follow Share Peephole optimization is form of optimization which is performed to a code which is local. hence final answer is B)Local Optimization final answer:) 1 votes 1 votes shweta1920 commented May 5, 2017 reply Follow Share according to ur answer option c would have been answer but b is given 0 votes 0 votes Please log in or register to add a comment.