[Bug debug/105158] ftree-ccp (CFG cleanup) drops DWARF const value attribute at -Og/-O1/-O2/-O3
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed May 4 07:52:15 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105158
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:1ba68f78c9d2510eb095f7d8a90c87cd5fd4183d
commit r13-99-g1ba68f78c9d2510eb095f7d8a90c87cd5fd4183d
Author: Richard Biener <rguenther@suse.de>
Date: Tue Apr 5 15:23:54 2022 +0200
debug/105158 - improve debug stmt retaining for forwarder removal
Currently when we cannot move debug stmt from a forwarder to the
destination block we drop/reset them. But in some cases as for
the testcase we can move them to the predecessor when that has
a single successor and we can insert after the last stmt of the
block. That allows us to preserve debug info here.
2022-04-05 Richard Biener <rguenther@suse.de>
PR debug/105158
* tree-cfgcleanup.cc (move_debug_stmts_from_forwarder):
Move debug stmts to the predecessor if moving to the
destination is not possible.
(remove_forwarder_block): Adjust.
(remove_forwarder_block_with_phi): Likewise.
More information about the Gcc-bugs
mailing list