COMPUTER SCIENCE AND ENGINEERING
COMPILER DESIGN
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
they enhance the portability of the compiler to other target processors
|
|
program analysis is more accurate on intermediate code than on machine code
|
|
the information from dataflow analysis cannot otherwise be used for optimization
|
|
the information from the front end cannot otherwise be used for optimization
|
Detailed explanation-1: -Some code optimizations are carried out on the intermediate code because program analysis is more accurate on intermediate code than on machine code.
Detailed explanation-2: -Code optimization is a program modification strategy that endeavours to enhance the intermediate code, so a program utilises the least potential memory, minimises its CPU time and offers high speed.
Detailed explanation-3: -But the main purpose of doing some code-optimization on intermediate code generation is to enhance the portability of the compiler to target processors.
Detailed explanation-4: -The code optimization in the synthesis phase is a program transformation technique, which tries to improve the intermediate code by making it consume fewer resources (i.e. CPU, Memory) so that faster-running machine code will result.