This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: GCC build failed for native with your patch on 2002-03-06T18:46:34Z.
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-regression at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org, rth at cygnus dot com
- Cc: jh at suse dot cz, pme at gcc dot gnu dot org
- Date: Thu, 7 Mar 2002 14:08:07 +0100
- Subject: Re: GCC build failed for native with your patch on 2002-03-06T18:46:34Z.
- References: <200203062101.g26L18q30604@maat.cygnus.com>
> x/cvs-gcc/gcc/libjava/../libffi/include -I../libffi/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers -D__NO_MATH_INLINES -ffloat-store -W -Wall -D_GNU_SOURCE -DPREFIX=\"/maat/heart/tbox/objs\" -g -O2 -D_GNU_SOURCE -Wp,-MD,.deps/defineclass.pp -c /maat/heart/tbox/cvs-gcc/gcc/libjava/defineclass.cc -fPIC -DPIC -o .libs/defineclass.o
> /maat/heart/tbox/cvs-gcc/gcc/libjava/defineclass.cc: In member function `void
> _Jv_ClassReader::read_one_method_attribute(int)':
> /maat/heart/tbox/cvs-gcc/gcc/libjava/defineclass.cc:607: Missing REG_EH_REGION
> note in the end of bb 10
> /maat/heart/tbox/cvs-gcc/gcc/libjava/defineclass.cc:607: verify_flow_info
> failed
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
Hi,
the libjava failure shows latent problem in GCSE and -fnon-call-exceptions.
Basically when PRE is made over isntruction that do trap, an reg-reg copy
instruction is inserted afterwards. This result in invalid CFG and
verify_flow_info correctly complains.
I was tryig to make gcse handle updating of CFG properly, but it is getting
tricky, as I can't insert new BBS to keep tables in sync and I can't emit
instruction to edges as they are seen by subsequent passes before
commit_edge_insertions, so I am attaching the patch to disable GCSE on possibly
trapping instructions. This solves the failure and lets i386 mainline to
bootstrap again. I am just bootstrapping with -fnon-call-exceptions to check
that everything is fine and I will install the patch as obvious to avoid the
current breakage.
Would be the patch OK for 3.1 branch as well?
Honza
Thu Mar 7 14:02:33 CET 2002 Jan Hubicka <jh@suse.cz>
* gcse.c (hash_scan_set): Refuse instructions with EH edges.
Index: gcse.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/gcse.c,v
retrieving revision 1.178
diff -c -3 -p -r1.178 gcse.c
*** gcse.c 2002/02/28 10:10:58 1.178
--- gcse.c 2002/03/07 13:01:28
*************** hash_scan_set (pat, insn, set_p)
*** 2189,2194 ****
--- 2189,2198 ----
&& regno >= FIRST_PSEUDO_REGISTER
/* Don't GCSE something if we can't do a reg/reg copy. */
&& can_copy_p [GET_MODE (dest)]
+ /* GCSE commonly inserts instruction after the insn. We can't
+ do that easily for EH_REGION notes so disable GCSE on these
+ for now. */
+ && !find_reg_note (insn, REG_EH_REGION, NULL_RTX)
/* Is SET_SRC something we want to gcse? */
&& want_to_gcse_p (src)
/* Don't CSE a nop. */