[PATCH] Jump bypassing and improved cprop (take 2)

John David Anglin dave@hiauly1.hia.nrc.ca
Mon Jun 3 14:02:00 GMT 2002

> By trial and error, I have determined that the following bootstrap failure
> under hppa-linux is a result of this patch:
>         * rtl.h (CC0_P): New.
> 	* gcse.c (cprop_jump): Use it with single_set.  Tweak dump text.
> 	(cprop_insn): Allow any mode register; use CC0_P.  CSE out single_set.
> 	(bypass_block): Save old dest block for dump text.
> 	(bypass_conditional_jumps): Allow any mode register; use CC0_P.
> 	Allow only true SET insns, not single_set.
> ./xgcc -B./ -B/home/dave/opt/gnu/hppa-linux/bin/ -isystem /home/dave/opt/gnu/hppa-linux/include -isystem /home/dave/opt/gnu/hppa-linux/sys-include -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include  -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/config -I../../gcc/gcc/../include  -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss  \
>    -c ../../gcc/gcc/crtstuff.c -DCRT_BEGIN \
>   -o crtbegin.o
> ../../gcc/gcc/crtstuff.c: In function `__do_global_dtors_aux':
> ../../gcc/gcc/crtstuff.c:282: internal error: Segmentation fault

I see that this is fixed (just a typo).

What actually started the hunt is the following ICE which is still present:

./xgcc -B./ -B/home/dave/opt/gnu/hppa-linux/bin/ -isystem /home/dave/opt/gnu/hppa-linux/include -isystem /home/dave/opt/gnu/hppa-linux/sys-include -O2  -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include  -fPIC -DELF=1 -DLINUX=1 -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/config -I../../gcc/gcc/../include  -DL_muldi3 -c ../../gcc/gcc/libgcc2.c -o libgcc/./_muldi3.o
../../gcc/gcc/libgcc2.c: In function `__muldi3':
../../gcc/gcc/libgcc2.c:367: virtual array insn_addresses[211]: element 229 out of bounds in pa_output_function_prologue, at config/pa/pa.c:3185

The above error occurs on the following line:

      total_code_bytes += INSN_ADDRESSES (INSN_UID (get_last_insn ()));

INSN_UID (get_last_insn ()) is 229.  Something has messed up the size of
the array insn_addresses.  This could be the above mentioned patch or some
other subsequent patch.

J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

More information about the Gcc-patches mailing list