CSS Prepare

optional · CSS study notes

Intermediate Code and Code Generation

  • Intermediate code: a machine-independent representation (e.g., three-address code, quadruples) bridging the front-end (language-specific) and back-end (machine-specific) phases — enables retargeting a compiler to different machines by only rewriting the back-end
  • Code Generation considerations: choice of target machine instruction set, run-time storage management (stack/heap allocation for variables), register allocation (deciding which values live in limited CPU registers vs memory — a classical optimization/graph-coloring problem)