The compiler phases

The typical compiler invocation command executes some or all of the following programs in sequence. For link-time optimizations, some of the phases will be executed more than once during a compilation. As each program runs, the results are sent to the next step in the sequence.

  1. A preprocessor
  2. The compiler, which consists of the following phases:
    1. Front-end parsing and semantic analysis
    2. Loop transformations
    3. Interprocedural analysis
    4. Optimization
    5. Register allocation
    6. Final assembly
  3. The assembler (for any .s files)
  4. The linker ld