COMPUTER SCIENCE AND ENGINEERING
COMPILER DESIGN
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. is called the “constant folding” technique of compiler optimization.
Detailed explanation-2: -(D) x = 4 ∗ 5 => x = 20 is an example of common subexpression elimination. Explanation: (A) A basic block is a sequence of instructions where control enters the sequence at the beginning and exits at the end is TRUE.
Detailed explanation-3: -Common Sub-expression elimination. Dead code elimination. Code movement. Strength reduction.
Detailed explanation-4: -Common Subexpression Elimination is an optimization that searches for instances of identical expressions, and replaces them with a single variable holding the computed value.
Detailed explanation-5: -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.