Which intermediate code representation is most suitable for performing local optimizations like constant folding and copy propagation?

14 views
  • Abstract Syntax Tree (AST)
  • Three-Address Code (TAC) (Correct Answer)
  • Syntax Directed Translation (SDT)
  • Parse Tree

Explanation

Three-Address Code (TAC) is widely used for local optimizations because each instruction has at most three operands, making constant folding, copy propagation, and strength reduction easier to perform than on AST or Parse Trees.

Comments (0)

No comments yet. Be the first to comment!

Want to practice more?

Explore thousands of MCQs across every exam category on Exams Nepal.

Find More MCQs