From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5652938582A5; Fri, 16 Feb 2024 14:49:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5652938582A5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708094992; bh=YMvzJ/A85+1Yxlu1TRR6IDhfxlFnVv9hsRKhRGw0R0U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=KXAd2YHtR1Dh4Man2pNqa65e93o69ShpJAfoKzBmiIr2hSWakLkb7jAEsh180wtjB LspeIH04LCCLqEr415Ozdp3WhJX5S6xQofwvascyfWxc4W+NmNSIRuK0+ekz9EfiCI S9/x3OK0cDf8bK63bFH46890ffg50KtALASIaVfs= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/54052] [11/12/13/14 Regression] g++ takes excessive time in opt and generate phase; can lead to Segmentation Fault when not enough memory available Date: Fri, 16 Feb 2024 14:49:48 +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: 4.6.3 X-Bugzilla-Keywords: compile-time-hog, 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: 11.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc short_desc cf_reconfirmed_on target_milestone 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=3D54052 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu.org, | |rsandifo at gcc dot gnu.org Summary|g++ takes excessive time in |[11/12/13/14 Regression] |opt and generate phase; can |g++ takes excessive time in |lead to Segmentation Fault |opt and generate phase; can |when not enough memory |lead to Segmentation Fault |available |when not enough memory | |available Last reconfirmed|2018-09-18 00:00:00 |2024-2-16 Target Milestone|--- |11.5 --- Comment #10 from Richard Biener --- GCC 14: -O0 800MB in 10s -O1 1.2GB in 30min (!) SSA construction (rtl_ssa::function_info::place_phis) takes forever. forward prop :1669.98 ( 95%) combiner : 34.80 ( 2%) TOTAL :1749.78 unsurprisingly -fno-forward-propagate helps a lot, compile-time down to 76s. GCC 11 seems to be similarly slow, stopped after some minutes, -fno-forward-propagate helps as well (63s). GCC 10 (no RTL SSA): -O1 1GB in 70s dominance frontiers : 13.69 ( 19%) combiner : 36.62 ( 50%) so there's at least a big regression from GCC 10 here. The testcase might be a bit large to work with and I didn't profile but for -O1 we need some "fix" here, even if it might be simply giving up for some CFG + nregs characteristics that makes things blow up here.=