Skip to main content

Module regalloc

Module regalloc 

Source
Expand description

Register allocator using graph coloring (Chaitin-Briggs).

Assigns physical registers to virtual registers. Handles interference graph construction, move coalescing, graph coloring with pre-colored parameters, and spill code generation. After allocation, rewrites VRegs to PhysRegs in the instruction stream.

Modules§

coalesce
Move coalescing to reduce register-to-register copies.
coloring
Graph coloring register allocator following Chaitin-Briggs.
interference
Interference graph construction.
live_range
Live range computation for virtual registers.
spill
Spill code generation for register allocation.

Functions§

allocate_registers
Perform register allocation on LIR instructions.
max_register_used
Count the maximum physical register index used.