Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How many passes over the code does gcc use?

Tags:

  • Specifically for C and C++, how many passes are used by default?
  • Does this number change depending on the level of optimization used? (it should)
  • Can it be changed directly?

I was searching for this information in http://gcc.gnu.org/, but googling using site:http://gcc.gnu.org/ did not yield anything.

Any pointers to any documentation about this will also be helpful.


By pass I meant a pass over the original representation of the source code only and not the multiple pass definition suggested by Wikipedia.

like image 691
Lazer Avatar asked Jun 24 '10 16:06

Lazer


People also ask

How many lines of code does GCC have?

GCC is a key component of the GNU toolchain and the standard compiler for most projects related to GNU and the Linux kernel. With roughly 15 million lines of code in 2019, GCC is one of the biggest free programs in existence.

Is GCC single pass?

GCC is a multi-pass compiler, with four distinct steps.

How many passes does a compiler have?

Pass is a complete traversal of the source program. Compiler has two passes to traverse the source program.


1 Answers

Passes and Files of the Compiler might be the closest thing to what you're looking for.

like image 105
nos Avatar answered Sep 19 '22 15:09

nos