From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DF6C33858025; Wed, 4 May 2022 07:52:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF6C33858025 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/105158] ftree-ccp (CFG cleanup) drops DWARF const value attribute at -Og/-O1/-O2/-O3 Date: Wed, 04 May 2022 07:52:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: patch X-Bugzilla-Severity: enhancement X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2022 07:52:16 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105158 --- Comment #5 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:1ba68f78c9d2510eb095f7d8a90c87cd5fd4183d commit r13-99-g1ba68f78c9d2510eb095f7d8a90c87cd5fd4183d Author: Richard Biener 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 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.=