register move costs broken

Alan Modra alan@linuxcare.com.au
Tue Feb 13 21:31: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.
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