author | title |
---|---|
Bharathi Ramana Joshi |
Notes on Essentials of Compilation |
- Spilling : pushing register values onto stack
- Caller-saved registers : registers that caller saves before call to function, allowing the function to reuse these registers
- Callee-saved registers : registers that callee restores before returning, allowing the caller to reuse these registers
- For variables not in use during a function call, try in order
- Put it in caller saved register
- Put it in callee saved register
- Spill it onto the stack
- Graph coloring for register allocation
- Vertices are variables
- Edges indicate when to variables interfere (i.e. are needed at the same time)