register move costs broken
Jan Hubicka
jh@suse.cz
Wed Feb 14 01:16:00 GMT 2001
> This patch:
>
> Mon Feb 12 17:28:48 CET 2001 Jan Hubicka <jh@suse.cz>
> * regclass.c (init_reg_sets_1): Optimize calculation of move_cost
> arrays.
>
> has dramatically changed may_move_in_cost and may_move_out_cost. I don't
> know whether that was intentional, but the effect on hppa64 is rather bad.
The patch should set to 65536 all cases, that does not make sense
(we can't allocate register of that mode in that class anyway). This should
not affect the register allocator decision in negative way.
(in fact it does, since sometimes such nonsential classes got into alternate
class).
I will try to figure out what happends.
Honza
> I'm seeing things like
>
> serial.c: In function `change_speed':
> serial.c:1803: Insn does not satisfy its constraints:
> (insn 1409 1406 649 (set (reg:DI 60 SAR [269])
> (mem:DI (plus:DI (reg/f:DI 30 %r30)
> (const_int -248 [0xffffff08])) 0)) 123 {*pa.md:3157} (nil)
> (nil))
> serial.c:1803: confused by earlier errors, bailing out
>
> Reverting the patch gives me
>
> (gdb) p may_move_in_cost
> $1 = {{{0, 0, 0, 0, 0, 0, 0, 0}, {2, 0, 0, 16, 16, 0, 16, 0}, {2, 2, 0, 16,
> 16, 0, 16, 0}, {0, 0, 0, 0, 0, 0, 0, 0}, {16, 16, 16, 2, 0, 0, 16, 0}, {
> 16, 16, 16, 16, 16, 0, 16, 0}, {256, 256, 256, 256, 256, 256, 0, 0}, {
> 256, 256, 256, 256, 256, 256, 256, 0}} <repeats 53 times>}
>
> With the patch...
>
> (gdb) p may_move_in_cost
> $1 = {{{65536, 65536, 65536, 65536, 65536, 65536, 65536, 65536}, {65536, 0,
> 0, 65536, 65536, 0, 65536, 0}, {65536, 2, 0, 65536, 65536, 0, 65536, 0},
> {65536, 65536, 65536, 65536, 65536, 65536, 65536, 65536}, {65536, 16, 16,
> 65536, 0, 0, 65536, 0}, {65536, 16, 16, 65536, 65536, 0, 65536, 0}, {
> 65536, 256, 256, 65536, 65536, 65536, 0, 0}, {65536, 256, 256, 65536,
> 65536, 65536, 65536, 0}}, {{65536, 65536, 65536, 65536, 65536, 65536,
> 65536, 65536}, {65536, 0, 0, 65536, 65536, 0, 65536, 0}, {65536, 2, 0,
> 65536, 65536, 0, 65536, 0}, {65536, 65536, 65536, 65536, 65536, 65536,
> 65536, 65536}, {65536, 16, 16, 65536, 0, 0, 65536, 0}, {65536, 16, 16,
> [lots more snipped]
>
> Alan Modra
> --
> Linuxcare. Support for the Revolution.
More information about the Gcc-bugs
mailing list