[Bug debug/94235] worse debug info with O0 than with O2 with flto
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Sep 7 07:55:37 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94235
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:fea13fcd0da0353520eb2675ad24c2f296611b85
commit r11-3026-gfea13fcd0da0353520eb2675ad24c2f296611b85
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Sep 7 09:54:38 2020 +0200
lto: Stream edge goto_locus [PR94235]
The following patch adds streaming of edge goto_locus (both LOCATION_LOCUS
and LOCATION_BLOCK from it), the PR shows a testcase (inappropriate for
gcc testsuite) where the lack of streaming of goto_locus results in worse
debug info.
Earlier version of the patch (without the output_function changes) failed
miserably, because on the order mismatch - input_function would
first input_cfg, then input_eh_regions and then input_bb (all of which now
have locations), while output_function used output_eh_regions, then
output_bb
and then output_cfg. *_cfg went to a separate stream...
Now, is there a reason why the order is different?
If the intent is that the cfg could be read separately from the rest of
function or vice versa, alternatively we'd need to clear_line_info ();
before output_eh_regions and before/after output_cfg to make them
independent.
2020-09-07 Jakub Jelinek <jakub@redhat.com>
PR debug/94235
* lto-streamer-out.c (output_cfg): Also stream goto_locus for
edges.
Use bp_pack_var_len_unsigned instead of streamer_write_uhwi to
stream
e->dest->index and e->flags.
(output_function): Call output_cfg before output_ssa_name, rather
than
after streaming all bbs.
* lto-streamer-in.c (input_cfg): Stream in goto_locus for edges.
Use bp_unpack_var_len_unsigned instead of streamer_read_uhwi to
stream
in dest_index and edge_flags.
More information about the Gcc-bugs
mailing list