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-14T14:15:04Z.
- 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, rsandifo at redhat dot com
- Date: Thu, 14 Mar 2002 18:15:05 +0100
- Subject: Re: GCC build failed for native with your patch on 2002-03-14T14:15:04Z.
- References: <200203141633.g2EGXAZ23541@maat.cygnus.com>
> With your recent patch, GCC does not compile on:
> native
> Attached is build output for those targets.
>
> The build failures are new.
>
> For more information, see <http://people.redhat.com/geoffk/gcc-regression/>.
...
> +
> + * recog.c (split_insn): Use delete_insn_and_edges.
Hi,
the problem is caused by the split_insn fix I made for darwin. The problem is
that I've made split_insn to actually remove insn instead of patching it out
and I had to change split_insns check to use same way as other loops do -
verify whether we got to NEXT_INSN (bb->end). This unfortuantely does not work
as the NEXT_INSN (bb->end) may be changed by try_split called via split_insn in
case new barrier is created.
This patch cleans up the exit condition so I hope it will work reliably now.
I've got past the problematic point in the bootstrap, but it is still in progress.
I've also found unrelated bug in try_split - delete_related_insns may actually
clobber the CFG.
OK for mainline/branch once testing finishes?
I am just starting the PPC bootstrap as well.
In case I will not get any negative reactions I will commit it as obvious to
the mainline to avoid breakage of bootstrap on i386.
I apologize for the breakage.
Honza
Thu Mar 14 17:48:38 CET 2002 Jan Hubicka <jh@suse.cz>
* emit-rtl.c (try_split): Use delete_insns.
* recog.c (split_all_insns): Fix terminating condition.
Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/emit-rtl.c,v
retrieving revision 1.256
diff -c -3 -p -r1.256 emit-rtl.c
*** emit-rtl.c 2002/03/09 12:53:17 1.256
--- emit-rtl.c 2002/03/14 16:42:14
*************** try_split (pat, trial, last)
*** 3076,3082 ****
tem = emit_insn_after (seq, trial);
! delete_related_insns (trial);
if (has_barrier)
emit_barrier_after (tem);
--- 3076,3082 ----
tem = emit_insn_after (seq, trial);
! delete_insn (trial);
if (has_barrier)
emit_barrier_after (tem);
Index: recog.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/recog.c,v
retrieving revision 1.141
diff -c -3 -p -r1.141 recog.c
*** recog.c 2002/03/14 10:10:10 1.141
--- recog.c 2002/03/14 17:08:10
*************** split_all_insns (upd_life)
*** 2735,2748 ****
{
basic_block bb = BASIC_BLOCK (i);
rtx insn, next;
! for (insn = bb->head; insn ; insn = next)
{
rtx last;
/* Can't use `next_real_insn' because that might go across
CODE_LABELS and short-out basic blocks. */
next = NEXT_INSN (insn);
last = split_insn (insn);
if (last)
{
--- 2735,2750 ----
{
basic_block bb = BASIC_BLOCK (i);
rtx insn, next;
+ bool finish = false;
! for (insn = bb->head; !finish ; insn = next)
{
rtx last;
/* Can't use `next_real_insn' because that might go across
CODE_LABELS and short-out basic blocks. */
next = NEXT_INSN (insn);
+ finish = (insn == bb->end);
last = split_insn (insn);
if (last)
{
*************** split_all_insns (upd_life)
*** 2756,2768 ****
changed = 1;
insn = last;
}
-
- if (next == NEXT_INSN (bb->end))
- break;
}
-
- if (insn == NULL)
- abort ();
}
if (changed)
--- 2758,2764 ----