Multi-pass compiler
A multi-pass compiler is a type of compiler that processes the source code or abstract syntax tree of a program several times.[src] This is in contrast to a one-pass compiler, which traverses the program only once.[src] Each pass takes the result of the previous pass as the input, and creates an intermediate output.[src] In this way, the (intermediate) code is improved pass by pass, until the final pass produces the final code.[src] Multi-pass compilers are sometimes called wide compilers, referring to the greater scope of the passes: they can "see" the entire program being compiled, instead of just a small portion of it.[src] The wider scope thus available to these compilers allows better code generation (e.g.[src] smaller code size, faster code) compared to the output of one-pass compilers, at the cost of higher compiler time and memory consumption.[src] In addition, some languages cannot be compiled in a single pass, as a result of their design.[src]
A multi-pass compiler is a type of compiler that processes the source code or abstract syntax tree of a program several times.[src] This is in contrast to a one-pass compiler, which traverses the program only once.[src] Each pass takes the result of the previous pass as the input, and creates an intermediate output.[src] In this way, the (intermediate) code is improved pass by pass, until the final pass produces the final code.[src] Multi-pass compilers are sometimes called wide compilers, referring to the greater scope of the passes: they can "see" the entire program being compiled, instead of just a small portion of it.[src] The wider scope thus available to these compilers allows better code generation (e.g.[src] smaller code size, faster code) compared to the output of one-pass compilers, at the cost of higher compiler time and memory consumption.[src] In addition, some languages cannot be compiled in a single pass, as a result of their design.[src] if (cond) { ...[src] } else { ...[src] } In addition to performing semantic analysis at this stage of compilation, often symbol tables are created in order to assist in code generation.[src] ==Frameworks== There are a number of meta-frameworks for designing multi-pass compilers, such as nanopass compilers which use explicit intermediate languages.[src] Bornat, Richard, Understanding and Writing Compilers: A Do It Yourself Guide, Macmillan Publishing, 1979.[src] Bent Thomsen, Languages and Compilers SProg og Overseattere, Department of Computer Science, Aalborg University[src]
22 sentences · 22 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Multi-pass compiler." encyclopegia.org, 2026, https://encyclopegia.org/wiki/multi-pass-compiler. Accessed 29 November 2026.
Chicago
"Multi-pass compiler." encyclopegia.org. Accessed November 29, 2026. https://encyclopegia.org/wiki/multi-pass-compiler.
APA
encyclopegia.org. (2026). Multi-pass compiler. Retrieved November 29, 2026, from https://encyclopegia.org/wiki/multi-pass-compiler
Accessed November 29, 2026 · CC BY-SA 4.0 · citation page · JSON