gcc.info: Class Preferences
Go forward to Modifiers
Go backward to Multi-Alternative
Go up to Constraints
Go to the top op gcc
Register Class Preferences
The operand constraints have another function: they enable the
compiler to decide which kind of hardware register a pseudo register is
best allocated to. The compiler examines the constraints that apply to
the insns that use the pseudo register, looking for the
machine-dependent letters such as `d' and `a' that specify classes of
registers. The pseudo register is put in whichever class gets the most
"votes". The constraint letters `g' and `r' also vote: they vote in
favor of a general register. The machine description says which
registers are considered general.
Of course, on some machines all registers are equivalent, and no
register classes are defined. Then none of this complexity is relevant.
Created Wed Sep 1 16:42:23 2004 on bee with info_to_html version 0.9.6.