From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 61440385780B; Fri, 30 Oct 2020 13:55:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 61440385780B From: "wsnyder at wsnyder dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/97623] [9/10/11 Regression] Extremely slow O2 compile (>>O(n^2)) Date: Fri, 30 Oct 2020 13:55:08 +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: 9.3.1 X-Bugzilla-Keywords: compile-time-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: wsnyder at wsnyder dot org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.4 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: Fri, 30 Oct 2020 13:55:08 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97623 --- Comment #7 from Wilson Snyder --- Thanks for the quick service. I can't easily try GCC trunk, but: -O2 compile 98.61s runtime 25.76s -O2 -fno-code-hoisting compile 40.13s runtime 26.40s (+2.5%) -Os compile 4.25s runtime 23.42s (-10%) That -Os runs faster is expected as this program is generally instruction-f= etch limited. I'd have expected -fno-code-hoisting to help more, compile time w= ise. Am I correct in understanding that the slowdown is roughly correlated to the number of "if" or "?:" statements?=