RTUComputer ScienceYr 2023 · Sem 52023

Q8Compiler Design

Question

2 marks

What is Three-Address Code?

Answer

TAC is an intermediate code format where each instruction has at most three operands.

Three-Address Code (TAC) is a highly optimized, linear intermediate representation utilized internally by compilers. It strictly mandates that every single mathematical or logical instruction contains a maximum of exactly three operands (e.g., two sources and one destination, like x = y + z). This structure flawlessly mimics the actual hardware registers of the target CPU.

Back to Paper