From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 627F73858022; Wed, 14 Feb 2024 16:26:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 627F73858022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707927974; bh=DpQUnu8C2kG30MyjbOeO6jAEAc4KULYB61O9GO1f6rk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DRE3a/PYGjp40WfuGCkaJhgQ7FzGjQAeTJvvEPpCSG6ukzSUJRh7g98mFgD00HHrr t/t3KsgOR/exiXvwDka5Bqpc+2K+FY/+CHM44DeJe+QmOfw2nEvBkY0Lwx/5LXoU3n 1ubVbOnUlNeP+d3cPiGER7DWHIzcTs3VTE2fVwOA= From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/113291] [14 Regression] compilation never (?) finishes with recursive always_inline functions at -O and above since r14-2172 Date: Wed, 14 Feb 2024 16:26:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: compile-time-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113291 --- Comment #5 from Jan Hubicka --- There is a cap in want_inline_self_recursive_call_p which gives up on inlin= ing after reaching max recursive inlining depth of 8. Problem is that the tree = here is too wide. After early inlining f0 contains 4 calls to f1 and 3 calls to = f0. Similarly for f0, so we have something like (9+3*9)^8 as a cap on number of inlines that takes a while to converge. One may want to limit number of copies of function A within function B rath= er than depth, but that number can be large even for sane code. I am making patch to make inliner to ignore always_inline on all self-recru= sive inline decisions.=