[patch][rfc] Hookize SMALL_REGISTER_CLASSES, make SSE register classes not small

Steven Bosscher stevenb.gcc@gmail.com
Wed Dec 10 16:24:00 GMT 2008


On Wed, Dec 10, 2008 at 4:26 PM, Richard Guenther <rguenther@suse.de> wrote:
>> > That's exactly why I decided to try to make SMALL_REGISTER_CLASSES
>> > depend no machine mode.  It's a safe bet that the compiler doesn't
>> > have to walk on eggs for a register in an SSE mode (and
>> > AFAIU-the-x86_64-instruction-set, also not for 64-bit integer
>> > instructions?).
>> >
>>
>> FWIW, we have Yz constraint for xmm0:
>>
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38402
>
> Indeed.  So the CPU folks start adding special register requirements
> again ... :/  That just means for x86_64 a safe bet is
> !TARGET_SSE4_1 && !TARGET_SSE4_2.

I really don't think this is necessary. There are enough XMM registers
for the register allocator to choose for the other instructions, or to
spill XMM0 to between instructions. And the instructions with the Yz
constraint either work only with non-sse registers or they have
reg_not_xmm0_operand as a predicate for the other operands. And then
if all else fails, the address registers are still in
SMALL_REGISTER_CLASSES so you can still spill to memory. It is not
necessary if the register allocator has enough freedom. You really
can't compare this to the integer registers.

Gr.
Steven



More information about the Gcc-patches mailing list