pa reload problem
John David Anglin
dave@hiauly1.hia.nrc.ca
Wed, 13 Dec 2000 19:48:21 -0500 (EST)
> I was going to deleting the hack and adding a general_operand test in
> local-alloc to see if that would fix the reload problem with "-fPIC".
> However, for the moment, there are still problems with a "normal" build
> at "-O3". With only the yesterdays CVS source and the patch below
> to prevent rename registers walking of the return pointer, I get the
> following failure building libstdc++ v2:
>
> /xxx/gnu/gcc-2.97/objdir/gcc/g++ -B/xxx/gnu/gcc-2.97/objdir/gcc/ -nostdinc++ -isystem /xxx/gnu/gcc-2.97/libstdc++ -isystem /xxx/gnu/gcc-2.97/libstdc++/std -isystem /xxx/gnu/gcc-2.97/libstdc++/stl -isystem /xxx/gnu/gcc-2.97/libio -isystem /xxx/gnu/gcc-2.97/objdir/hppa1.1-hp-hpux10.20/libio -L/xxx/gnu/gcc-2.97/objdir/hppa1.1-hp-hpux10.20/libstdc++ -B/usr/local/hppa1.1-hp-hpux10.20/bin/ -B/usr/local/hppa1.1-hp-hpux10.20/lib/ -isystem /usr/local/hppa1.1-hp-hpux10.20/include -c -O3 -fno-implicit-templates -I../../../libstdc++ -I../../../libstdc++/stl -I../libio -I../../../libstdc++/../libio -I../../../libstdc++/../include -I../../../libstdc++/../gcc -nostdinc++ ../../../libstdc++/exception.cc
> ../../../libstdc++/exception.cc: In function `void __check_eh_spec(int, const
> void**)':
> ../../../libstdc++/exception.cc:363: Internal error: Segmentation fault.
I have made some progress in locating this bug but still don't have a
complete understanding of the problem. The problem is that a code_label
insn is "incorrectly" deleted in the loop pass. Here is the rtl from
the gcse pass:
[snip]
(code_label 1158 1268 1439 124 "" "" [3 uses])
(note 1439 1158 262 [bb 12] NOTE_INSN_BASIC_BLOCK -1347440721)
(note 262 1439 1159 85 NOTE_INSN_EH_REGION_END -1347440721)
[snip]
(insn 788 787 789 (set (reg/f:SI 209)
(high:SI (label_ref:SI 1158))) 87 {*pa.md:2435} (nil)
(expr_list:REG_EQUAL (high:SI (label_ref:SI 1158))
(insn_list:REG_LABEL 1158 (nil))))
(insn 789 788 791 (set (reg/f:SI 208)
(lo_sum:SI (reg/f:SI 209)
(label_ref:SI 1158))) 90 {*pa.md:2467} (nil)
(insn_list:REG_LABEL 1158 (expr_list:REG_EQUAL (label_ref:SI 1158)
(nil))))
Here is the rtl after loop:
Loop from 576 to 1288: 105 real insns.
Continue at insn 1278.
[snip]
Insn 788: regno 209 (life 2), move-insn savings 2 moved to 1530
Insn 789: regno 208 (life 1), move-insn forces 788 savings 1 moved to 1532
[snip]
(insn 1531 1528 1532 (set (reg/f:SI 337)
(high:SI (label_ref:SI 1158))) -1 (nil)
(expr_list:REG_LABEL (code_label/v 1158 1268 1439 124 "" "" [0 uses])
(nil)))
(insn 1532 1531 1535 (set (reg/f:SI 208)
(lo_sum:SI (reg/f:SI 337)
(label_ref:SI 1158))) -1 (nil)
(expr_list:REG_EQUAL (label_ref:SI 1158)
(expr_list:REG_LABEL (code_label/v 1158 1268 1439 124 "" "" [0 uses])
(nil))))
The code_label 1158 is deleted by delete_trivially_dead_insns apparently
because the preceding call to loop_optimize in toplev.c has reduced the
number of uses to 1. Maybe somebody can see how this occurs.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)