This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Bootstrap failure on i686-linux
- From: law at redhat dot com
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: Paul Brook <paul at nowt dot org>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, Richard Henderson <rth at redhat dot com>, Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Date: Mon, 01 Sep 2003 21:52:49 -0600
- Subject: Re: [tree-ssa] Bootstrap failure on i686-linux
- Reply-to: law at redhat dot com
In message <1062466928.6332.27.camel@frodo.toronto.redhat.com>, Diego Novillo w
rites:
>After undoing those patches I ran into another failure that was caused
>by:
>
>+2003-09-01 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
>+ Jeff Law <law@redhat.com>
>+
>+ * basic-block.h (BB_LOOP_CONTROL_EXPR): Remove.
>+ * c-simplify.c (gimplify_c_loop): Create loops in a better shape.
>+ * cfgloop.h (create_loop_notes): Declare.
>+ * cfgloopmanip.c (create_loop_notes): New.
>+ * explow.c (probe_stack_range): Don't produce loop notes when we
>+ recreate them.
>+ * expr.c (emit_block_move_via_loop): Ditto.
>+ * gimplify.c (build_and_jump): Export.
>+ (gimplify_loop_expr): Don't produce LOOP_EXPRs.
>+ * toplev.c (rest_of_compilation): Recreate loop notes if needed.
>+ * tree-cfg.c (make_loop_expr_edges, make_loop_expr_blocks): Removed.
>+ (find_contained_blocks, make_ctrl_stmt_edges,
>+ remove_useless_stmts_and_vars, stmt_ends_bb_p, bsi_insert_before,
>+ find_insert_location, bsi_insert_on_edge_immediate,
>+ merge_tree_blocks): Remove handling of LOOP_EXPRs.
>+ (remove_stmt): Remove handling of BB_LOOP_CONTROL_EXPR.
>+ (find_taken_edge): Remove comment on LOOP_EXPRs.
>+ (dump_tree_bb): Don't dump loop-related information.
>+ (is_loop_stmt, is_latch_block_for): Removed.
>+ (find_insert_location): Handle TRY_CATCH and TRY_FINALLY.
>+ * tree-flow.h (is_loop_stmt, loop_body, set_loop_body,
>+ is_latch_block_for): Removed.
>+ * tree-dfa.c (get_stmt_operands): Don't handle LOOP_EXPRs.
>+ * tree-simple.c (is_gimple_stmt): Remove handling of LOOP_EXPRs.
>+ * tree-simple.h: Remove LOOP_EXPRs from gimple grammar comment.
>+ (build_and_jump): Declare.
>+ * tree-ssa.c (remove_annotations_r): Don't handle LOOP_EXPRs.
>+
>
>This one fails when building libiberty after bootstrapping:
This is clearly PRE's fault. It fucks up the block statement iterators. If
anything needs to be turned off, it is PRE.
Using my simplified testcase (-O2 -pedantic). The block #3 exhibits the
problem:
# BLOCK 3. PRED: 2. SUCC: 4.
<UL5380>:;;
# VUSE <MT.1_6>;
T.1_12 = *p_1;
mcnt_13 = (int)T.1_12;
goto <UL5150>;;
(void)0;
If I put a breakpoint just before PRE runs:
(gdb) p basic_block_info.data.bb[3]
$32 = (struct basic_block_def *) 0x89d9f7c
(gdb) p bsi_start ($32)
$33 = {tp = 0xbf1a867c, context = 0x0}
(gdb) p bsi_stmt ($33)
$34 = (union tree_node *) 0xbf1861dc
(gdb) p debug_tree($34)
<label_expr 0xbf1861dc
type <void_type 0xbf1c78c0 void VOID
align 8 symtab 0 alias set -1
pointer_to_this <pointer_type 0xbf1c7930>>
side-effects
arg 0 <label_decl 0xbf185380 VOID file j.c line 23
align 1 alias set 1 context <function_decl 0xbf183b60 foo>
j.c:23>>
Which looks perfectly reasonable.
After PRE is complete:
(gdb) p basic_block_info.data.bb[3]
$37 = (struct basic_block_def *) 0x89d9f7c
(gdb) p bsi_start ($37)
$38 = {tp = 0x0, context = 0x89d9f7c}
(gdb) p bsi_end_p ($38)
$39 = true
Which looks rather bogus to me.
Jeff