Are you an EPFL student looking for a semester project?
Work with us on data science and visualisation projects, and deploy your project as an app on top of Graph Search.
An intermediate representation (IR) is the data structure or code used internally by a compiler or virtual machine to represent source code. An IR is designed to be conducive to further processing, such as optimization and translation. A "good" IR must be accurate – capable of representing the source code without loss of information – and independent of any particular source or target language. An IR may take one of several forms: an in-memory data structure, or a special tuple- or stack-based code readable by the program. In the latter case it is also called an intermediate language. A canonical example is found in most modern compilers. For example, the CPython interpreter transforms the linear human-readable text representing a program into an intermediate graph structure that allows flow analysis and re-arrangement before execution. Use of an intermediate representation such as this allows compiler systems like the GNU Compiler Collection and LLVM to be used by many different source languages to generate code for many different target architectures. An intermediate language is the language of an abstract machine designed to aid in the analysis of computer programs. The term comes from their use in compilers, where the source code of a program is translated into a form more suitable for code-improving transformations before being used to generate or machine code for a target machine. The design of an intermediate language typically differs from that of a practical machine language in three fundamental ways: Each instruction represents exactly one fundamental operation; e.g. "shift-add" addressing modes common in microprocessors are not present. Control flow information may not be included in the instruction set. The number of processor registers available may be large, even limitless. A popular format for intermediate languages is three-address code. The term is also used to refer to languages used as intermediates by some high-level programming languages which do not output object or machine code themselves, but output the intermediate language only.
Felix Schürmann, Pramod Shivaji Kumbhar, Omar Awile, Ioannis Magkanaris
Aude Billard, Kunpeng Yao, Soheil Gholami, Torstein Ragnar Meling, Anaëlle Olivia Marie Manon