PING: PR/17236, improve long long multiply on x86 (middle-end)

Paolo Bonzini bonzini@gnu.org
Thu Feb 21 16:54:00 GMT 2008


Richard Guenther wrote:
> 2008/2/20 Paolo Bonzini <bonzini@gnu.org>:
>> http://gcc.gnu.org/ml/gcc-patches/2007-12/msg00995.html
> 
> The combine trick is obvious, but I'd like to know whether the two
> other tweaks have an impact on other targets.  Does the combine
> trick alone help?  Can you try crafting a testcase somehow (I realize
> this might be difficult, but maybe counting the number of moves
> works out in a target dependent test).

No, all three are necessary.  Each is a tiny step further: with the 
regclass.c hunk GCC "considers" using %eax, but without the 
local-alloc.c hunk that class is already taken by another pseudo.  The 
combine.c hunk is actually the least necessary of all; without it, GCC 
just generates one more memory access, but not more spills.

The regclass.c hunk is also pretty obvious -- it is just a trick to 
improve coalescing between a register that dies and one that has a 
duplicate constraint with the dying register (a la regmove).  Note that 
if the register does not die, the behavior is the same as without the 
patch (alt_cost += 2).

Most RISC processors would probably be unaffected by the changes, since 
they have plenty of registers and no small register classes.  sh could 
be an, ehm, interesting target to test.

Paolo



More information about the Gcc-patches mailing list