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. As each compilation component runs, the results are sent to the next step in the sequence.
- 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
To see the compiler step through these phases, specify the -v compiler option when you compile your application. To see the amount of time the compiler spends in each phase, specify -ftime-report (-qphsinfo).