Dependence-Conscious Global Register Allocation
Wolfgang Ambrosch and M. Anton Ertl and Felix Beer and Andreas Krall
Institut für Computersprachen
Technische Universität Wien
Argentinierstraße 8
A-1040 Wien, Austria
{anton,andi}@complang.tuwien.ac.at
Abstract
Register allocation and instruction scheduling are
antagonistic optimizations: Whichever is applied
first, it will impede the other. To solve this problem, we
propose dependence-conscious colouring, a register
allocation method that takes the dependence graph
used by the instruction scheduler into
consideration. Dependence-conscious colouring
consists of two parts: First, the interference graph
is built by analysing the dependence graphs,
resulting in fewer interference edges and less
spilling than the conventional preordering approach.
Secondly, during colouring the register selection
keeps dependence paths short, ensuring good
scheduling. Dependence-conscious
colouring reduces the number of interference edges
by 7%--24% and antidependences by 46%-100%.