COMPUTER SCIENCE AND ENGINEERING
COMPILER DESIGN
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Lexical Analysis
|
|
Syntax Analysis
|
|
Semantic Analysis
|
|
Code Generation
|
|
Code Optimisation
|
Detailed explanation-1: -Code optimisation occurs throughout the compilation process and, in particular, as part of the code generation stage. The optimiser may identify redundant or repeated code, and remove or rearrange the code as necessary. This ensures the code runs as fast as possible.
Detailed explanation-2: -At an overview level, the process can be split into four separate stages: Preprocessing, compilation, assembly, and linking.
Detailed explanation-3: -Code Generation In the sixth and the final phase of the compiler, code generation receives as input the optimized intermediate code and translates the optimized intermediate code into the target machine language. This phase involves assembly language usage to convert optimized code into target machine format.