The src/regalloc Directory

Namespace regalloc, delivered for TC-9. Colors the Interference graph and allocates registers.

File: libregalloc.* (src/regalloc/)

The interface of the regalloc module. It exports a single procedure allocate_registers, which allocates the registers for each fragment and removes useless moves. It returns a TempMap associating each temporary to a register.

File: color.* (src/regalloc/)

The Color implementation. Colors an interference graph.

File: regallocator.* (src/regalloc/)

The RegisterAllocator implementation. Repeat the coloration until it succeeds (no spills).