StreakPeaked· Practice

ExamsGATETechnical

One of the purposes of using intermediate code in compilers is to

  1. make parsing and semantic analysis simpler.
  2. improve error recovery and error reporting.
  3. increase the chances of reusing the machine-independent code optimizer in other compilers.
  4. improve the register allocation.

Correct answer: increase the chances of reusing the machine-independent code optimizer in other compilers.

Solution

Using intermediate code allows for a separation between the front-end and back-end of the compiler, enabling the machine-independent code optimizer to be reused across different compilers, thus enhancing efficiency and reducing development time.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →