The src/regalloc Directory

Namespace regalloc, delivered for TC-9. Coloration of the Interference graph and registers allocation.

File: local.am (src/regalloc/)

This is a Makefile configuration relative to the src/regalloc/ directory. It is responsible for the integration into the libtc library with everything exported from the regalloc module, and the linkage of the directory’s unit tests in the test-suite.

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: tasks.* (src/regalloc/)

Tasks related to the regalloc module (see: The src/task Directory).


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).


File: test-regalloc.cc (src/regalloc/)

Unit tests.