INTRODUCTION TO COMPILER DESIGN
OVERVIEW OF COMPILERS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
A basic block is a sequence of instructions where control enters the sequence at the beginning and exits at the end.
|
|
Available expression analysis can be used for common subexpression elimination
|
|
Live variable analysis can be used for dead code elimination.
|
|
x = 4 β 5 => x = 20 is an example of common subexpression elimination
|
Detailed explanation-1: -x = 4 Γ 5 β x = 20 βis an example of common subexpression elimination.] is False.
Detailed explanation-2: -Dead code elimination is a compiler optimization to remove code which does not affect the program results. Live variable analysis is a classic data-flow analysis to calculate the variables that are live at each point in the program. Hence, is efficient for Dead code elimination.
Detailed explanation-3: -Copy propagation generally creates dead code that can then be eliminated. Eliminating dead code improves efficiency of the program by avoiding the execution of unnecessary statements at run time. Hence in this paper, the two techniques are combined using new algorithm called hash based value numbering.