Message ID | alpine.LSU.2.11.1403191015360.6041@zhemvz.fhfr.qr |
---|---|
State | New |
Headers | show |
> > This fixes PR59543 (confirmed by Jakub for the testcase at least) > by not dropping debug stmts during WPA phase. > > LTO profiled-bootstrapped on x86_64-unknown-linux-gnu, applied. > > Honza - you can always come up with a better fix for 4.10. I guess this may work well. Other option (as mentioned in the PR) is to consistently turn statements IDS into pointers on function body read in that seems little but more robust to me. Thanks, Honza > > Richard. > > 2014-03-19 Richard Biener <rguenther@suse.de> > > PR lto/59543 > * lto-streamer-in.c (input_function): In WPA stage do not drop > debug stmts. > > Index: lto-streamer-in.c > =================================================================== > --- lto-streamer-in.c (revision 208642) > +++ lto-streamer-in.c (working copy) > @@ -988,7 +988,7 @@ input_function (tree fn_decl, struct dat > We can't remove them earlier because this would cause uid > mismatches in fixups, but we can do it at this point, as > long as debug stmts don't require fixups. */ > - if (!MAY_HAVE_DEBUG_STMTS && is_gimple_debug (stmt)) > + if (!MAY_HAVE_DEBUG_STMTS && !flag_wpa && is_gimple_debug (stmt)) > { > gimple_stmt_iterator gsi = bsi; > gsi_next (&bsi);
Index: lto-streamer-in.c =================================================================== --- lto-streamer-in.c (revision 208642) +++ lto-streamer-in.c (working copy) @@ -988,7 +988,7 @@ input_function (tree fn_decl, struct dat We can't remove them earlier because this would cause uid mismatches in fixups, but we can do it at this point, as long as debug stmts don't require fixups. */ - if (!MAY_HAVE_DEBUG_STMTS && is_gimple_debug (stmt)) + if (!MAY_HAVE_DEBUG_STMTS && !flag_wpa && is_gimple_debug (stmt)) { gimple_stmt_iterator gsi = bsi; gsi_next (&bsi);