What is pass in compiler design?

1 answer

Answer

1081703

2026-08-17 19:10

+ Follow

There are two types of compilers one-pass and multi-pass. Pass means that some of inner operations are repeated several times.

If we have one-pass compiler and this source code:

i++;

i++;

i++;

Inside compiler it would generate:

i = i + 1;

i = i + 1;

i = i + 1;

If compiler would be two-pass:

i = i + 3;

The more passes compiler has, the better optimized code it can generate, but it is slower because it must repeat some steps again.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.