COMPILER DESIGN

INTRODUCTION TO COMPILER DESIGN

OVERVIEW OF COMPILERS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following statements about peephole optimization is False?
A
It is applied to a small part of the code
B
It can be used to optimize intermediate code
C
To get the best out of this, it has to be applied repeatedly
D
It can be applied to the portion of the code that is not contiguous
Explanation: 

Detailed explanation-1: -Peephole optimization is an optimization technique performed on a small set of compiler-generated instructions; the small set is known as the peephole or window. Peephole optimization involves changing the small set of instructions to an equivalent set that has better performance.

Detailed explanation-2: -Redundant instruction elimination. Elimination of unreachable code. Reduction in strength. Algebraic simplifications. Use of machine idioms. 02-Mar-2023

There is 1 question to complete.