From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A1C883857731; Tue, 18 Apr 2023 12:38:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A1C883857731 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681821492; bh=MG9E48nIklGf5EIXR1OHMv+jFuuswcwQdSj5DkPOkhw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SiLXBlvXI6EaGOq5vtq0Rtx6eTIyHMeuoCJgrOMlwu46TWnc00NCiq7UpMqeXgaoJ +uDnAePWx9fMyyAhHqaZU++iWxm3qKeKV21gvwnInl80aLUseR0Hm/6i28cvlqrZYe 05HNxJxXt9+BZpingX5dfMbwZDDurQrcC6FRkVSE= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109539] [13/14 Regression] Compile-time hog in gimple-ssa-warn-access.cc since r13-6706-gadb70c2d1060b3 Date: Tue, 18 Apr 2023 12:38:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal 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: 13.0 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109539 --- Comment #5 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:fdbaab2dc886f78a1e75512eeee0faa17e77c862 commit r14-30-gfdbaab2dc886f78a1e75512eeee0faa17e77c862 Author: Richard Biener Date: Tue Apr 18 11:49:48 2023 +0200 tree-optimization/109539 - restrict PHI handling in access diagnostics Access diagnostics visits the SSA def-use chains to diagnose things like dangling pointer uses. When that runs into PHIs it tries to prove all incoming pointers of which one is the currently visited use are related to decide whether to keep looking for the PHI def uses. That turns out to be overly optimistic and thus costly. The following scraps the existing handling for simply requiring that we eventually visit all incoming pointers of the PHI during the def-use chain analysis and only then process uses of the PHI def. Note this handles backedges of natural loops optimistically, diagnosing the first iteration. There's gcc.dg/Wuse-after-free-2.c containing a testcase requiring this. PR tree-optimization/109539 * gimple-ssa-warn-access.cc (pass_waccess::check_pointer_uses): Re-implement pointer relatedness for PHIs.=