From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CBA593851A89; Mon, 13 Jun 2022 12:47:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CBA593851A89 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105838] g++ 12.1.0 runs out of memory or time when building const std::vector of std::strings Date: Mon, 13 Jun 2022 12:47:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.1.0 X-Bugzilla-Keywords: 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: everconfirmed bug_status cf_reconfirmed_on 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: Mon, 13 Jun 2022 12:47:42 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105838 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2022-06-13 --- Comment #1 from Richard Biener --- Confirmed with -O1. At -O0 I see > /usr/bin/time /space/rguenther/install/gcc-12.1/bin/g++ -S t.C 13.44user 0.34system 0:15.71elapsed 87%CPU (0avgtext+0avgdata 1139560maxresident)k 65584inputs+23864outputs (77major+275588minor)pagefaults 0swaps with -O1 it uses >20GB of memory in cleanup_all_empty_eh. It might be the order of optimizing this is exposing some quadratic amount of edge redirection, I have not yet analyzed this in detail but trimming down the testcase should help here. There isn't much allocation done here besides the edge redirection SSA update stuff for PHIs.=