1. Home
  2. Compiler Design

Filters

Found 1 Question

Set Default
Exams
Subjects
Topics

List of top Compiler Design Questions on Code Optimization - Common Subexpression Elimination (Available Expressions)

Consider the control flow graph shown in the figure.



The basic blocks are:
B1: \(a = b + i\)
B2: \(a = g*k\); \(f = d-f\); \(a = c*4\)
B3: \(t = g*k\); \(b = c+m\)
B4: \(x = g*k\); \(y = b+i\)
B5: \(z = c+m\)

B1 has two successors, B2 and B3, both B2 and B3 flow into B4, and B4 flows into B5.

Which one of the following options correctly lists the set of redundant expressions (common subexpressions) in the basic blocks B4 and B5?

Note: All the variables are integers.
  • GATE CS - 2026
  • GATE CS
  • Compiler Design
  • Code Optimization - Common Subexpression Elimination (Available Expressions)
contact us
terms & conditions
Privacy & Policy
© 2026 Patronum Web Private Limited