From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 85ABA3870C31; Tue, 14 May 2024 10:59:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 85ABA3870C31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1715684373; bh=k82uGYtSv8+XPW85qLHAzTiZhPzRtZmk2AZvzFSRCUY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uTvNWGzMPaulzsDWGroie43YdpSt+35WdqDQszwLkOER3DEiZ0VSAneYmGiAmfNn7 G8nP2/94jSX9Jj/1U59BxF+D0Pta6FV/G4HNVEenwr+oDCWshSFGqFctsEYHlCtPDs 3wdQJ2yeHBCdmRycYzki76RTeNhy5dY3Va0/UJCY= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/113291] [14/15 Regression] compilation never (?) finishes with recursive always_inline functions at -O and above since r14-2172 Date: Tue, 14 May 2024 10:59:31 +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: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: hubicka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.2 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 #10 from GCC Commits --- The master branch has been updated by Jan Hubicka : https://gcc.gnu.org/g:1ec49897253e093e1ef6261eb104ac0c111bac83 commit r15-482-g1ec49897253e093e1ef6261eb104ac0c111bac83 Author: Jan Hubicka Date: Tue May 14 12:58:56 2024 +0200 Reduce recursive inlining of always_inline functions this patch tames down inliner on (mutiply) self-recursive always_inline functions. While we already have caps on recursive inlning, the testcase combines early inliner and late inliner to get very wide recursive inlining tree. The basic i= dea is to ignore DISREGARD_INLINE_LIMITS when deciding on inlining self recursive functions (so we cut on function being large) and clear the flag once it is detec= ted. I did not include the testcase since it still produces a lot of code and would slow down testing. It also outputs many inlining failed messages that = is not very nice, but it is hard to detect self recursin cycles in full genera= lity when indirect calls and other tricks may happen. gcc/ChangeLog: PR ipa/113291 * ipa-inline.cc (enum can_inline_edge_by_limits_flags): New enu= m. (can_inline_edge_by_limits_p): Take flags instead of multiple bools; add flag for forcing inlinie limits. (can_early_inline_edge_p): Update. (want_inline_self_recursive_call_p): Update; use FORCE_LIMITS m= ode. (check_callers): Update. (update_caller_keys): Update. (update_callee_keys): Update. (recursive_inlining): Update. (add_new_edges_to_heap): Update. (speculation_useful_p): Update. (inline_small_functions): Clear DECL_DISREGARD_INLINE_LIMITS on self recursion. (flatten_function): Update. (inline_to_all_callers_1): Update.=