A multi-pass compiler is a type of compiler that processes the source code or abstract syntax tree of a program several times. A compiler is a Computer program (or set of programs that translates text written in a computer language (the source language) into another In Computer science, source code (commonly just source or code) is any sequence of statements or declarations written in some Human-readable In Computer science, an abstract syntax tree (AST or just syntax tree, is a tree representation of the Syntax of some Source code This is in contrast to a one-pass compiler, which traverses the program only once. In Computer programming, a one-pass compiler is a Compiler that passes through the Source code of each Compilation unit only once Each pass takes the result of the previous pass as the input, and creates an intermediate output. In this way, the (intermediate) code is improved pass by pass, until the final pass emits the final code.
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. The wider scope thus available to these compilers allows better code generation (e. g. smaller code size, faster code) compared to the output of one-pass compilers, at the cost of higher compiler time and memory consumption. In addition, some languages cannot be compiled in a single pass, as a result of their design. A programming language is an Artificial language that can be used to write programs which control the behavior of a machine particularly a Computer.