I have seen a lot of posts regarding one pass and multi pass compilers but i dont seem to get the point.
What are one
The origin of the term multi-pass comes from a time when computers had a lot less memory. Compilers need a lot of memory, and in a small memory machine, this is hard to manage.
So the original idea was a compiler ran in multiple passes. The first pass read the source code, and did basic tasks such as syntax checking, maybe building a symbol table, and then wrote its results to a disk file for the second pass. Each successive pass N would read the previous pass's result, and change the program representation to move it further and further towards machine code, and write out its results for pass N+1 to read. This process repeated until the final pass produced the final code. Many compilers could get by a few ("multi") passes; there were reputed compilers with dozens of passes built on really old machines.
(This same concept applies to so called "two pass assemblers": first pass reads the assembler source code, syntax checks, figures out what location values should be used for label symbols; second pass produces object code using the knowledge of the symbol locations assigned in the first pass).
Memory is now larger, and it is quite practical for read source code for every very big programs into memory, have the compiler do all its work in the memory of a single process, and write the object code. You still see some analogical remnants of this in the concept of linkers; they glue together multiple object modules ("the first pass") into a single binary.
If you look at compiler internally, they operate in phases. Typical phases might be:
* Parse and syntax check
* Build symbol tables
* Perform semantic sanity check
* Determine control flow
* Determine data flow
* Generate some "intermediate" language (representing abstract instructions)
* Optimize the intermediate language
* Generate machine code from the optimized language
What a specific compiler does for phases varies from compiler to compiler. Each of these steps pushes the program representations closer to the final machine code. An N-pass compiler would bundle one or more of these steps into a single pass.
Back to present times, we have lots of memory; no need for a modern compiler to write the intermediate results to a disk file, so all these phases happen in the memory of a single process. You, the compiler user, don't see them. So you might call modern compilers "one pass" in the original senses of the word. Since nobody now cares, the phrase has simply fallen into disuse.
In any case, the compilers are still generally multi-phased internally. (There are compilers that do all of these steps in what amounts a single phase; normally, they cannot do a lot of optmization).