Intermediate representation
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 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. ==References== ==External links== The Stanford SUIF Group
References
No reference rows published for this article.
Cite this article
MLA
"Intermediate representation." encyclopegia.org, 2026, https://encyclopegia.org/wiki/intermediate-representation. Accessed 24 November 2026.
Chicago
"Intermediate representation." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/intermediate-representation.
APA
encyclopegia.org. (2026). Intermediate representation. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/intermediate-representation
Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON