The GATE Grind

GATE 2025 CS (CS1) – Question 13

Compiler Design · Code Optimization and Data Flow Analysis · 1 mark · Multiple choice

Which ONE of the following techniques used in compiler code optimization uses live variable analysis?

  1. Run-time function call management
  2. Register assignment to variables
  3. Strength reduction
  4. Constant folding

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (B) Register assignment to variables

Explanation

Live variable analysis tells which variables hold values still needed. This drives register allocation, since variables that are not simultaneously live can share a register.