This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: autoincrement patches for gcc 4 - updated patch

Richard Henderson wrote:

On Wed, May 18, 2005 at 03:21:56PM +0100, Joern RENNECKE wrote:

Add this to the ChangeLog:
* (have_3addr_const_add): New variable.

I haven't tried this follow-on patch, but I can say that your
most recently posted full patch miscompiles stage2 on ia64.

The have_3addr_const_add stuff basically controls when to apply
some optimizations in order to gain a benefit, now how to apply them
or to determine when they are safe.  So any influence on the correctness
would be purely incidential.

stage2/xgcc -Bstage2/ -B/medalla/rth/gcc/run-41-ai/ia64-unknown-linux-gnu/bin/ -c   -DUSE_LIBUNWIND_EXCEPTIONS -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition -Werror -fno-common   -DHAVE_CONFIG_H    -I. -I. -I/medalla/rth/gcc/src-autoinc/gcc -I/medalla/rth/gcc/src-autoinc/gcc/. -I/medalla/rth/gcc/src-autoinc/gcc/../include -I/medalla/rth/gcc/src-autoinc/gcc/../libcpp/include  /medalla/rth/gcc/src-autoinc/gcc/tree-cfg.c -o tree-cfg.o
/medalla/rth/gcc/src-autoinc/gcc/tree-cfg.c: In function    add_phi_args_after_cop
/medalla/rth/gcc/src-autoinc/gcc/tree-cfg.c:4929: internal compiler error: Segmentation fault

I havn't tracked down the failure.

I don't have access to an ia64 platform, so I can't reproduce this.

configure says:
# No gdb support yet.
noconfigdirs="$noconfigdirs readline mmalloc libgui itcl gdb"
So it doesn't look like I can do any simulator testing, either.
If you do a non-bootstrap build & regtest, maybe you'll find a failure
that is easier to pin down? A cross-compiler build apparently works OK,
so once I have a testcase that is miscompiled, with a pointer to what in
the asm code is wrong, I can pick it up from there.
There are three main suspects for the failure:
- A bug (or anachronism) in the optimize_related_values pass
- Bitrot or a latent bug in the rest of regmove. Since the elimination of
SEQUENCE as the result of expanders, most of regmove has been disabled
because of a failure to update discover_flags_reg.
- An assumption in the rest of regmove or even in another pass fails because
of a valid, but unedxpected transformation.

Coming back to the have_3addr_const_add code: The initialization is actually
not quite right yet. A three-address insn will be recognized for most or all
two-address targets before reload. But with an additional check of find_matches
I get the right result both for ppc and sh, i.e. have_3addr_const_add is set for
ppc-eabisim for SImode and DImode, but cleared for all modes for sh-elf.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]