From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 197F73858D28; Tue, 24 Jan 2023 09:43:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 197F73858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674553387; bh=A3GvZp9/bjObdFjE2xvTX9l96qxiXKJ3It/+/r4gJcc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ryspoJf0z4RMsqWSnwiOf99KA0Qr9hsEbrw4eCeYCD6kL4WoLiuP4uojwc9iupGHZ htOtKFrqyse9osUDsRBZMPa2OvR/PCBw1VEWgKpX7Sjw5r34UrYLLFnWwCPZZmFPAV yJkX3oNC5tS+V8g/IQmyaQDA4gaWFwxkw2zYJhzs= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108500] -O -finline-small-functions results in "internal compiler error: Segmentation fault" on a very large program (700k function calls) Date: Tue, 24 Jan 2023 09:43:06 +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: 12.2.0 X-Bugzilla-Keywords: compile-time-hog, ice-on-valid-code, memory-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created 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=3D108500 --- Comment #5 from Richard Biener --- Created attachment 54331 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D54331&action=3Dedit CFG cleanup "early merging" OK, I take that back. For this simple testcase the attached works, delaying the dominance compute until the iterative cleanup phase for blocks with multiple predecessors. I didn't otherwise test it and I think if you add a diamond to the inlined function you will still hit the issue, so it isn't a "fix". It's also going to slow down CFG cleanup a bit. Though it would be nice to not require dominance queries during it since it's inevitably going to do slow queries. That also hints at another possible fix which is to simply not compute those from CFG cleanup (but there's no API entry for that yet).=