Discussion
Which ONE of the following techniques used in compiler code optimization uses live variable analysis?
Answer: B
Live variable analysis is used for Register assignment to variables.
A variable is live at a point if its current value may be used later. Two variables that are never live at the same time can share a register, so register allocation builds an interference graph from liveness information and colours it with the available registers. Liveness also tells the allocator when a register can be freed or a value need not be stored back.
Strength reduction replaces expensive operations such as multiplication by cheaper ones such as addition, usually in loops with induction variables. Constant folding evaluates constant expressions at compile time. Run-time function call management concerns activation records. None of these depends on liveness.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development