Compiler phases
A typical compiler invocation executes some or all of these activities in sequence. For link time optimizations, some activities are executed more than once during a compilation.
- Preprocessing of source files
- Compilation, which might consist of the following phases, depending
on what compiler options are specified:
- Front-end parsing and semantic analysis
- High-level optimization
- Low-level optimization
- Register allocation
- Final assembly
- Assembling the assembly (.s) files and the unpreprocessed assembler (.S) files after they are preprocessed
- Object linking to create an executable application
Some separation of these phases is observable with the -v compiler option. To see the amount of time the compiler spends in various phases, specify -ftime-report.