From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 69E313A19349; Thu, 29 Apr 2021 08:04:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 69E313A19349 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/38474] compile time explosion in dataflow_set_preserve_mem_locs at -O3 Date: Thu, 29 Apr 2021 08:04:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.4.0 X-Bugzilla-Keywords: compile-time-hog, memory-hog, patch 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: --- 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: Thu, 29 Apr 2021 08:04:11 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D38474 --- Comment #101 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:c57a8aea0c3ab8394f7dbfa417ee27b4613f63b7 commit r12-280-gc57a8aea0c3ab8394f7dbfa417ee27b4613f63b7 Author: Richard Biener Date: Thu Apr 29 08:32:00 2021 +0200 middle-end/38474 - speedup PTA constraint solving In testcases like PR38474 and PR99912 we're seeing very slow PTA solving. One can observe an excessive amount of forwarding, mostly during sd constraint solving. The way we solve the graph does not avoid forwarding the same bits through multiple paths, and especially when such alternate path involves ESCAPED as intermediate this causes the ESCAPED solution to be expanded in receivers. The following adds heuristic to add_graph_edge which adds forwarding edges but also guards the initial solution forwarding (which is the expensive part) to detect the case of ESCAPED receiving the same set and the destination already containing ESCAPED. This speeds up the PTA solving process by more than 50%. 2021-04-29 Richard Biener PR middle-end/38474 * tree-ssa-structalias.c (add_graph_edge): Avoid direct forwarding when indirect forwarding through ESCAPED alread happens.=