COMPILER DESIGN

INTRODUCTION TO COMPILER DESIGN

COMPILATION PROCESS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Redundant code is removed in:
A
Lexical Analysis
B
Syntax Analysis
C
Code Generation
D
Code Optimisation
Explanation: 

Detailed explanation-1: -A code optimizing process must follow the three rules given below: The output code must not, in any way, change the meaning of the program. Optimization should increase the speed of the program and if possible, the program should demand less number of resources.

Detailed explanation-2: -Peephole optimization in compiler design is used in compilers to reduce the redundancy in generated machine code. It works by analyzing a small section of code (known as a peephole) and making local changes that improve the code’s efficiency without affecting its behavior.

There is 1 question to complete.