* Cfgcleanup fix
@ 2002-06-21 22:36 Zdenek Dvorak
2002-06-22 3:16 ` Jan Hubicka
2002-06-25 13:16 ` Rainer Orth
0 siblings, 2 replies; 7+ messages in thread
From: Zdenek Dvorak @ 2002-06-21 22:36 UTC (permalink / raw)
To: gcc-pdo, gcc-patches, jh, rth, ro
Hello.
The following patch fixes updating of liveness information in
try_crossjump_to_edge; this fixes Ada bootstrap failure on
sparc-sun-solaris2.8.
Bootstrapped and regtested on i686. Also bootstrapped on
sparc-sun-solaris2.8 (c and ada only).
Zdenek Dvorak
Changelog:
* cfgcleanup.c (try_crossjump_to_edge): Fix updating of liveness
information.
Index: cfgcleanup.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cfgcleanup.c,v
retrieving revision 1.62
diff -c -3 -p -r1.62 cfgcleanup.c
*** cfgcleanup.c 10 Jun 2002 21:36:12 -0000 1.62
--- cfgcleanup.c 22 Jun 2002 03:23:31 -0000
*************** try_crossjump_to_edge (mode, e1, e2)
*** 1310,1320 ****
{
int nmatch;
basic_block src1 = e1->src, src2 = e2->src;
! basic_block redirect_to;
rtx newpos1, newpos2;
edge s;
- rtx last;
- rtx label;
/* Search backward through forwarder blocks. We don't need to worry
about multiple entry or chained forwarders, as they will be optimized
--- 1310,1318 ----
{
int nmatch;
basic_block src1 = e1->src, src2 = e2->src;
! basic_block redirect_to, redirect_from, to_remove;
rtx newpos1, newpos2;
edge s;
/* Search backward through forwarder blocks. We don't need to worry
about multiple entry or chained forwarders, as they will be optimized
*************** try_crossjump_to_edge (mode, e1, e2)
*** 1442,1469 ****
if (GET_CODE (newpos1) == NOTE)
newpos1 = NEXT_INSN (newpos1);
- last = src1->end;
! /* Emit the jump insn. */
! label = block_label (redirect_to);
! emit_jump_insn_after (gen_jump (label), src1->end);
! JUMP_LABEL (src1->end) = label;
! LABEL_NUSES (label)++;
!
! /* Delete the now unreachable instructions. */
! delete_insn_chain (newpos1, last);
!
! /* Make sure there is a barrier after the new jump. */
! last = next_nonnote_insn (src1->end);
! if (!last || GET_CODE (last) != BARRIER)
! emit_barrier_after (src1->end);
!
! /* Update CFG. */
! while (src1->succ)
! remove_edge (src1->succ);
! make_single_succ_edge (src1, redirect_to, 0);
! update_forwarder_flag (src1);
return true;
}
--- 1440,1453 ----
if (GET_CODE (newpos1) == NOTE)
newpos1 = NEXT_INSN (newpos1);
! redirect_from = split_block (src1, PREV_INSN (newpos1))->src;
! to_remove = redirect_from->succ->dest;
! redirect_edge_and_branch_force (redirect_from->succ, redirect_to);
! flow_delete_block (to_remove);
!
! update_forwarder_flag (redirect_from);
return true;
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Cfgcleanup fix
2002-06-21 22:36 Cfgcleanup fix Zdenek Dvorak
@ 2002-06-22 3:16 ` Jan Hubicka
2002-06-25 13:16 ` Rainer Orth
1 sibling, 0 replies; 7+ messages in thread
From: Jan Hubicka @ 2002-06-22 3:16 UTC (permalink / raw)
To: Zdenek Dvorak; +Cc: gcc-pdo, gcc-patches, jh, rth, ro
> Hello.
>
> The following patch fixes updating of liveness information in
> try_crossjump_to_edge; this fixes Ada bootstrap failure on
> sparc-sun-solaris2.8.
>
> Bootstrapped and regtested on i686. Also bootstrapped on
> sparc-sun-solaris2.8 (c and ada only).
>
> Zdenek Dvorak
>
> Changelog:
> * cfgcleanup.c (try_crossjump_to_edge): Fix updating of liveness
> information.
>
..
> *************** try_crossjump_to_edge (mode, e1, e2)
> *** 1442,1469 ****
>
> if (GET_CODE (newpos1) == NOTE)
> newpos1 = NEXT_INSN (newpos1);
> - last = src1->end;
>
> ! /* Emit the jump insn. */
> ! label = block_label (redirect_to);
> ! emit_jump_insn_after (gen_jump (label), src1->end);
> ! JUMP_LABEL (src1->end) = label;
> ! LABEL_NUSES (label)++;
> !
> ! /* Delete the now unreachable instructions. */
> ! delete_insn_chain (newpos1, last);
> !
> ! /* Make sure there is a barrier after the new jump. */
> ! last = next_nonnote_insn (src1->end);
> ! if (!last || GET_CODE (last) != BARRIER)
> ! emit_barrier_after (src1->end);
> !
> ! /* Update CFG. */
> ! while (src1->succ)
> ! remove_edge (src1->succ);
> ! make_single_succ_edge (src1, redirect_to, 0);
>
> ! update_forwarder_flag (src1);
>
> return true;
> }
> --- 1440,1453 ----
>
> if (GET_CODE (newpos1) == NOTE)
> newpos1 = NEXT_INSN (newpos1);
>
> ! redirect_from = split_block (src1, PREV_INSN (newpos1))->src;
> ! to_remove = redirect_from->succ->dest;
>
> ! redirect_edge_and_branch_force (redirect_from->succ, redirect_to);
> ! flow_delete_block (to_remove);
> !
> ! update_forwarder_flag (redirect_from);
This looks good. The main purpose for the old code was to avoid creating
and destroying of basic block at time it had linear time complexity. I
have to check rest of code for similar hacks.
Honza
>
> return true;
> }
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Cfgcleanup fix
2002-06-21 22:36 Cfgcleanup fix Zdenek Dvorak
2002-06-22 3:16 ` Jan Hubicka
@ 2002-06-25 13:16 ` Rainer Orth
2002-07-05 9:38 ` Unreviewed Ada bootstrap patch for 3.2 [Re: Cfgcleanup fix] Rainer Orth
1 sibling, 1 reply; 7+ messages in thread
From: Rainer Orth @ 2002-06-25 13:16 UTC (permalink / raw)
To: Zdenek Dvorak; +Cc: gcc-pdo, gcc-patches, jh, rth
Zdenek Dvorak writes:
> The following patch fixes updating of liveness information in
> try_crossjump_to_edge; this fixes Ada bootstrap failure on
> sparc-sun-solaris2.8.
>
> Bootstrapped and regtested on i686. Also bootstrapped on
> sparc-sun-solaris2.8 (c and ada only).
Indeed: I've successfully bootstrapped with this patch on
sparc-sun-solaris2.8 and i386-pc-solaris2.8 with Ada included. There are a
few new regressions compared to 20020617, but they almost certainly
unrelated to this patch:
On i386-pc-solaris2.8:
+FAIL: g77.f-torture/execute/f90-intrinsic-bit.f compilation, -Os
+FAIL: gcc.c-torture/compile/20001226-1.c, -O1
+FAIL: gcc.c-torture/compile/20001226-1.c, -O2
+FAIL: gcc.c-torture/compile/20001226-1.c, -O3 -fomit-frame-pointer
+FAIL: gcc.c-torture/compile/20001226-1.c, -Os
On sparc-sun-solaris2.8:
+FAIL: g77.f-torture/execute/f90-intrinsic-bit.f compilation, -Os
+FAIL: g77.f-torture/execute/f90-intrinsic-bit.f compilation, -Os
+FAIL: gcc.c-torture/compile/20001226-1.c, -O2
+FAIL: gcc.c-torture/compile/20001226-1.c, -O3 -fomit-frame-pointer
+FAIL: gcc.c-torture/compile/20001226-1.c, -Os
+FAIL: gcc.c-torture/execute/20020108-1.c compilation, -Os
+FAIL: gcc.c-torture/execute/20020108-1.c compilation, -Os
These have been reported by various people already.
+FAIL: gcc.c-torture/execute/simd-1.c compilation, -O0
+FAIL: gcc.c-torture/execute/simd-1.c compilation, -O1
+FAIL: gcc.c-torture/execute/simd-1.c compilation, -O2
+FAIL: gcc.c-torture/execute/simd-1.c compilation, -O3 -fomit-frame-pointer
+FAIL: gcc.c-torture/execute/simd-1.c compilation, -O3 -g
+FAIL: gcc.c-torture/execute/simd-1.c compilation, -Os
/vol/gnu/src/gcc/gcc-dist/gcc/testsuite/gcc.c-torture/execute/simd-1.c: In function `main':
/vol/gnu/src/gcc/gcc-dist/gcc/testsuite/gcc.c-torture/execute/simd-1.c:33: internal compiler error: Internal compiler error in simplify_gen_subreg, at simplify-rtx.c:2551
+FAIL: gcc.dg/simd-1.c (test for excess errors)
/vol/gnu/src/gcc/gcc-dist/gcc/testsuite/gcc.dg/simd-1.c:44: internal compiler error: Internal compiler error in emit_move_insn_1, at expr.c:3150
These only happen with -m64.
Thanks for your help.
Rainer
^ permalink raw reply [flat|nested] 7+ messages in thread
* Unreviewed Ada bootstrap patch for 3.2 [Re: Cfgcleanup fix]
2002-06-25 13:16 ` Rainer Orth
@ 2002-07-05 9:38 ` Rainer Orth
2002-07-05 23:58 ` Geert Bosch
0 siblings, 1 reply; 7+ messages in thread
From: Rainer Orth @ 2002-07-05 9:38 UTC (permalink / raw)
To: gcc-patches; +Cc: Zdenek Dvorak, gcc-pdo, jh, rth
I just noticed that the this patch
http://gcc.gnu.org/ml/gcc-patches/2002-06/msg01899.html
has remained unreviewed for more than three weeks. It is necessary to
allow Ada to bootstrap on at least sparc-sun-solaris2.8 and
i386-pc-solaris2.8.
Rainer
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Unreviewed Ada bootstrap patch for 3.2 [Re: Cfgcleanup fix]
2002-07-05 9:38 ` Unreviewed Ada bootstrap patch for 3.2 [Re: Cfgcleanup fix] Rainer Orth
@ 2002-07-05 23:58 ` Geert Bosch
2002-07-19 9:56 ` Zdenek Dvorak
0 siblings, 1 reply; 7+ messages in thread
From: Geert Bosch @ 2002-07-05 23:58 UTC (permalink / raw)
To: Rainer Orth; +Cc: gcc-patches, Zdenek Dvorak, gcc-pdo, jh, rth
On Friday, July 5, 2002, at 11:14 , Rainer Orth wrote:
> I just noticed that the this patch
>
> http://gcc.gnu.org/ml/gcc-patches/2002-06/msg01899.html
>
> has remained unreviewed for more than three weeks. It is necessary to
> allow Ada to bootstrap on at least sparc-sun-solaris2.8 and
> i386-pc-solaris2.8.
Just to be clear, even though the patch fixes the Ada bootstrap,
this is not an ada/ patch that I can review. It would be great if
this patch could get reviewed.
-Geert
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Unreviewed Ada bootstrap patch for 3.2 [Re: Cfgcleanup fix]
2002-07-05 23:58 ` Geert Bosch
@ 2002-07-19 9:56 ` Zdenek Dvorak
2002-07-29 8:34 ` Andreas Schwab
0 siblings, 1 reply; 7+ messages in thread
From: Zdenek Dvorak @ 2002-07-19 9:56 UTC (permalink / raw)
To: gcc-patches; +Cc: Rainer Orth, jh, rth
Hello.
> >I just noticed that the this patch
> >
> > http://gcc.gnu.org/ml/gcc-patches/2002-06/msg01899.html
> >
> >has remained unreviewed for more than three weeks. It is necessary to
> >allow Ada to bootstrap on at least sparc-sun-solaris2.8 and
> >i386-pc-solaris2.8.
>
> Just to be clear, even though the patch fixes the Ada bootstrap,
> this is not an ada/ patch that I can review. It would be great if
> this patch could get reviewed.
It would be really fine if someone could finally take a look on this.
I'm not sure whether it is still crucial for Ada bootstrap (the bug
could be easily masked by some other commit in the meantime), but anyway
it would be nice if it got fixed properly.
Zdenek
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Unreviewed Ada bootstrap patch for 3.2 [Re: Cfgcleanup fix]
2002-07-19 9:56 ` Zdenek Dvorak
@ 2002-07-29 8:34 ` Andreas Schwab
0 siblings, 0 replies; 7+ messages in thread
From: Andreas Schwab @ 2002-07-29 8:34 UTC (permalink / raw)
To: Zdenek Dvorak; +Cc: gcc-patches, Rainer Orth, jh, rth
Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> writes:
|> Hello.
|>
|> > >I just noticed that the this patch
|> > >
|> > > http://gcc.gnu.org/ml/gcc-patches/2002-06/msg01899.html
|> > >
|> > >has remained unreviewed for more than three weeks. It is necessary to
|> > >allow Ada to bootstrap on at least sparc-sun-solaris2.8 and
|> > >i386-pc-solaris2.8.
|> >
|> > Just to be clear, even though the patch fixes the Ada bootstrap,
|> > this is not an ada/ patch that I can review. It would be great if
|> > this patch could get reviewed.
|>
|> It would be really fine if someone could finally take a look on this.
|> I'm not sure whether it is still crucial for Ada bootstrap (the bug
|> could be easily masked by some other commit in the meantime), but anyway
|> it would be nice if it got fixed properly.
It is definitely still needed. FWIW, it also successfully fixes
bootstrapping Ada on ia64.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2002-07-29 15:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-21 22:36 Cfgcleanup fix Zdenek Dvorak
2002-06-22 3:16 ` Jan Hubicka
2002-06-25 13:16 ` Rainer Orth
2002-07-05 9:38 ` Unreviewed Ada bootstrap patch for 3.2 [Re: Cfgcleanup fix] Rainer Orth
2002-07-05 23:58 ` Geert Bosch
2002-07-19 9:56 ` Zdenek Dvorak
2002-07-29 8:34 ` Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).