Message ID | 3448714.nhJ8om10cS@polaris |
---|---|
State | New |
Headers | show |
Hi, the change in my patch was intentional, I forgot to send the email. Sorry for that. The reason is that labels/predictions/debug statements now go specially though DCE and are marked as neecessary, but not really handled so (i.e. we can remove conditional controlling only debug statements). This can cause an infinite loop. > > It's apparently another bug in the DCE pass. > > But it comes from a stalled ABNORMAL flag after the FRE3 pass so: I suppose the CFG verifier should also catch this. I wonder how this can lead to wrong code as opossed to infinite loop? I can imagine DCE being confused about non-control-flow stmt and conclude the abnormal path as the path leaving the loop. I will look into the testcase more. Thanks for working this out! Honza > > Index: tree-ssa-pre.c > =================================================================== > --- tree-ssa-pre.c (revision 231856) > +++ tree-ssa-pre.c (working copy) > @@ -4128,6 +4128,14 @@ eliminate_dom_walker::before_dom_childre > print_gimple_stmt (dump_file, stmt, 0, 0); > } > > + if (is_gimple_call (stmt) > + && stmt_can_make_abnormal_goto (stmt)) > + { > + bitmap_set_bit (need_ab_cleanup, gimple_bb (stmt)- > >index); > + if (dump_file && (dump_flags & TDF_DETAILS)) > + fprintf (dump_file, " Removed AB side-effects.\n"); > + } > + > pre_stats.eliminations++; > continue; > } > > is apparently sufficient. Testing... > > -- > Eric Botcazou
H.J., also once we get to bootstrapland with Ada and LTO, would be possible to enable it on the LTO bootstrap tester, so we won't break it again? Thanks, Honza
Index: tree-ssa-pre.c =================================================================== --- tree-ssa-pre.c (revision 231856) +++ tree-ssa-pre.c (working copy) @@ -4128,6 +4128,14 @@ eliminate_dom_walker::before_dom_childre print_gimple_stmt (dump_file, stmt, 0, 0); } + if (is_gimple_call (stmt) + && stmt_can_make_abnormal_goto (stmt)) + { + bitmap_set_bit (need_ab_cleanup, gimple_bb (stmt)- >index); + if (dump_file && (dump_flags & TDF_DETAILS)) + fprintf (dump_file, " Removed AB side-effects.\n"); + } + pre_stats.eliminations++; continue;
> It's apparently another bug in the DCE pass. But it comes from a stalled ABNORMAL flag after the FRE3 pass so: } is apparently sufficient. Testing...