**Constant propagation** is the process of substituting the values of known constants in expressions at compile time.

(D) is an example of constant propagation, note that it's not constant folding.

The Gateway to Computer Science Excellence

First time here? Checkout the FAQ!

x

+17 votes

Which one of the following is **FALSE**?

- 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 \Rightarrow x=20$ is an example of common subexpression elimination.

+18 votes

Best answer

- A basic block is a sequence of instructions where control enters the sequence at the beginning and exits at the end is TRUE.

- Available expression analysis can be used for common subexpression elimination is TRUE. Available expressions is an analysis algorithm that determines for each point in the program the set of expressions that need not be recomputed. Available expression analysis is used to do global common subexpression elimination (CSE). If an expression is available at a point, there is no need to re-evaluate it.

- Live variable analysis can be used for dead code elimination is TRUE.

- $x = 4 ∗ 5 \Rightarrow x = 20$ is an example of common subexpression elimination is FALSE. Common subexpression elimination (CSE) refers to compiler optimization replaces identical expressions (i.e., they all evaluate to the same value) with a single variable holding the computed value when it is worthwhile to do so Source: Geeksforgeeks

Correct Answer: $D$

- All categories
- General Aptitude 1.8k
- Engineering Mathematics 7.3k
- Digital Logic 2.9k
- Programming & DS 4.9k
- Algorithms 4.3k
- Theory of Computation 6k
- Compiler Design 2k
- Databases 4.1k
- CO & Architecture 3.4k
- Computer Networks 4.1k
- Non GATE 1.4k
- Others 1.4k
- Admissions 596
- Exam Queries 577
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

49,530 questions

54,139 answers

187,354 comments

71,068 users