COMPUTER SCIENCE AND ENGINEERING
COMPILER DESIGN
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
data flow analysis
|
|
constant folding
|
|
peep hole optimization
|
|
DFA and constant folding
|
Detailed explanation-1: -Loop Optimization is the process of increasing execution speed and reducing the overheads associated with loops. It plays an important role in improving cache performance and making effective use of parallel processing capabilities. Most execution time of a scientific program is spent on loops.
Detailed explanation-2: -Concept: Peephole optimization is a technique for locally improving the target code which is done by examining a sliding window of target instructions and replacing the instruction sequences within the peephole by shorter or faster sequences wherever possible. Constant folding is a peephole optimization.
Detailed explanation-3: -Peephole optimization is a type of code Optimization performed on a small part of the code. It is performed on a very small set of instructions in a segment of code. The small set of instructions or small part of code on which peephole optimization is performed is known as peephole or window.