| | 9 | 1. Stg -> Cmm: Converts to a flat representation of C--. |
| | 10 | 2. Cmm -> ZGraphCmm: |
| | 11 | * Converts the flat representation to a control-flow graph, with Cmm statements representing instructions in the basic blocks. |
| | 12 | * Implements calling conventions for call, jump, and return instructions: all parameter passing is turned into data-movement instructions (register-to-register move, load, or store), and stack-pointer adjustments are inserted. |
| | 13 | * How do we refer to locations on the stack when we haven't laid it out yet? The compiler names a stack slot using the idea of a "late compile-time constant," which is just a symbolic constant that will be replaced with an actual stack offset when the stack layout is chosen. |