gccint: Class Preferences
1
1 17.8.3 Register Class Preferences
1 ---------------------------------
1
1 The operand constraints have another function: they enable the compiler
1 to decide which kind of hardware register a pseudo register is best
1 allocated to. The compiler examines the constraints that apply to the
1 insns that use the pseudo register, looking for the machine-dependent
1 letters such as 'd' and 'a' that specify classes of registers. The
1 pseudo register is put in whichever class gets the most "votes". The
1 constraint letters 'g' and 'r' also vote: they vote in favor of a
1 general register. The machine description says which registers are
1 considered general.
1
1 Of course, on some machines all registers are equivalent, and no
1 register classes are defined. Then none of this complexity is relevant.
1