This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: epilogue scheduling for ppc
- To: Geoff Keating <geoffk at cygnus dot com>,gcc-patches at gcc dot gnu dot org
- Subject: Re: epilogue scheduling for ppc
- From: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Date: Sat, 22 Jan 2000 01:14:29 +0100
- References: <200001130142.RAA17926@localhost.cygnus.com>
Am Don, 13 Jan 2000 schrieb Geoff Keating:
>I am just about to commit this to the branch.
>
>At present, it won't work if you actually specify -msched-prolog on
>ELF targets under -fpic, because of register liveness problems. This
>will go away when I do the other half of the work and we can schedule
>the prologue.
>
>The cute part is in output_epilog when !TARGET_SCHED_PROLOG. It may
>be too cute; we'll see.
>
>--
>- Geoffrey Keating <geoffk@cygnus.com>
>
>===File ~/patches/cygnus/rs6000-esched-2.patch==============
>Index: ChangeLog
>===================================================================
>RCS file: /cvs/gcc/egcs/gcc/config/rs6000/Attic/ChangeLog,v
>retrieving revision 1.1.2.12
>diff -p -u -c -p -r1.1.2.12 ChangeLog
>*** ChangeLog 2000/01/13 00:42:25 1.1.2.12
>--- ChangeLog 2000/01/13 01:39:05
>***************
>*** 1,5 ****
>--- 1,26 ----
> 2000-01-12 Geoff Keating <geoffk@cygnus.com>
>
>+ * rs6000.md: Document 'unspec' values used.
>+ (epilogue): New expander.
>+ (movesi_to_cr_one): New expander.
>+ (movesi_to_cr and following): New pattern.
>+ (lmw): New pattern.
>+ (return_internal_si): New pattern.
>+ (return_internal_di): New pattern.
>+ (return_and_restore_fpregs_si): New pattern.
>+ (return_and_restore_fpregs_di): New pattern.
>+ * rs6000.h: Declare new functions.
>+ * rs6000.c (rs6000_stack_info): Use current_function_is_leaf
>+ rather than rs6000_calls_p.
>+ (rs6000_makes_calls): Delete.
>+ (lmw_operation): New function.
>+ (mtcrf_operation): New function.
>+ (rs6000_emit_epilogue): New function.
>+ (output_epilog): Call rs6000_emit_epilogue and final if
>+ !TARGET_SCHED_PROLOG, instead of writing text unconditionally.
Geoff, it seems this part breaks bootstrap on powerpc-linux-gnu at least with
--enable-checking=tree,gc,misc. It stops at the end of stage1 while compiling
_muldi3:
(gdb) r libgcc2.i -quiet -dumpbase libgcc2.c -mstrict-align -g1 -O2 -W -Wall -version -fPIC -o libgcc2.s
Starting program: /cvsx/obj/gccmnp/gcc/./cc1 libgcc2.i -quiet -dumpbase libgcc2.c -mstrict-align -g1 -O2 -W -Wall -version -fPIC -o libgcc2.s
During symbol reading...inner block (0xfee9000-0xfee900c) not inside outer block (0xff0b3a0-0xff0b494)...inner block (0xfee9000-0xfee918c) not inside outer block (0xff0b494-0xff0b620)...
inner block (0xfee9000-0xfee9138) not inside outer block (0xff0b7e8-0xff0b990)...block at 0xfee903c out of order...
inner block (0xfee9000-0xfee9128) not inside outer block (0xff156ac-0xff157d4)...block at 0xfee9058 out of order...Breakpoint 1 at 0xff156dc: file exit.c, line 84.
inner block (0xfee9000-0xfee9144) not inside outer block (0xff0b990-0xff0bad4)...block at 0xfee903c out of order...
inner block (0xfee9000-0xfee9048) not inside outer block (0xff0bad4-0xff0be24)...inner block (0xfee9000-0xfee9048) not inside outer block (0xff0bad4-0xff0be24)...
inner block (0xfee9000-0xfee9040) not inside outer block (0xff0bad4-0xff0be24)...inner block (0xfee9000-0xfee9040) not inside outer block (0xff0bad4-0xff0be24)...
inner block (0xfee9000-0xfee9040) not inside outer block (0xff0bad4-0xff0be24)...inner block (0xfee9000-0xfee9040) not inside outer block (0xff0bad4-0xff0be24)...
inner block (0xfee9000-0xfee9040) not inside outer block (0xff0bad4-0xff0be24)...inner block (0xfee9000-0xfee9040) not inside outer block (0xff0bad4-0xff0be24)...
inner block (0xfee9000-0xfee9040) not inside outer block (0xff0bad4-0xff0be24)...inner block (0xfee9000-0xfee9040) not inside outer block (0xff0bad4-0xff0be24)...
inner block (0xfee9000-0xfee9040) not inside outer block (0xff0bad4-0xff0be24)...inner block (0xfee9000-0xfee9040) not inside outer block (0xff0bad4-0xff0be24)...
inner block (0xfee9000-0xfee9040) not inside outer block (0xff0bad4-0xff0be24)...inner block (0xfee9000-0xfee981c) not inside outer block (0xff0c084-0xff0c9b0)...
block at 0xfee9138 out of order...inner block (0xfee9000-0xfee90f4) not inside outer block (0xff0d5cc-0xff0d6c0)...Breakpoint 3 at 0xff141c4: file ../sysdeps/generic/abort.c, line 139.
During symbol reading...inner block (0x30000000-0x30000558) not inside outer block (0x30005254-0x30007e50)...
inner block (0x30000000-0x3000029c) not inside outer block (0x30005254-0x30007e50)...inner block (0x30000000-0x300001d0) not inside outer block (0x30005254-0x30007e50)...
block at 0x3000004c out of order...inner block (0x30000000-0x3000000c) not inside outer block (0x3000c44c-0x3000c4b8)...
inner block (0x30000000-0x30000060) not inside outer block (0x3000c44c-0x3000c4b8)...
GNU C version 2.96 20000121 (experimental) (ppc-redhat-linux) compiled by GNU C version 2.96 20000121 (experimental).
Program received signal SIGSEGV, Segmentation fault.
try_combine (i3=0x300ce820, i2=0x300ce760, i1=0x0) at ../../../gccmnp/gcc/combine.c:2418
2418 i1notes = REG_NOTES (i1), i1links = LOG_LINKS (i1);
(gdb) l
2413 /* Get the old REG_NOTES and LOG_LINKS from all our insns and
2414 clear them. */
2415 i3notes = REG_NOTES (i3), i3links = LOG_LINKS (i3);
2416 i2notes = REG_NOTES (i2), i2links = LOG_LINKS (i2);
2417 if (i1)
2418 i1notes = REG_NOTES (i1), i1links = LOG_LINKS (i1);
2419
2420 /* Ensure that we do not have something that should not be shared but
2421 occurs multiple times in the new insns. Check this by first
2422 resetting all the `used' flags and then copying anything is shared. */
(gdb) p i1
$1 = 0x0
Note that line 2418 shouldn't have been executed at all. It seems your changes
break CR handling.
Franz.