From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A6E53385801F; Wed, 14 Feb 2024 17:14:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A6E53385801F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707930847; bh=LmfeC401guXGMk6/nh+6km2x1FkYKSjcJ4Trzb2W9Bg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=efTDFaUP3o8ugnymvPrkILdnQ8PVIYubfIZOpMIUpqymoKL+7GmgvQZhmukrIn3fh zj+n1Iqocmcz+G0mvCgR64vSarpjDvole6Os/q7T2kIn9adhIZa77ha3bP8fpCb5Px 4Zt3Lhgwb01MdTlM5w+DcwDSNh2Q27BAdP3Sy5VQ= 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 17:14:05 +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: attachments.created 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 #6 from Jan Hubicka --- Created attachment 57427 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D57427&action=3Dedit patch The patch makes compilation to finish in reasonable time. I ended up in need to dropping DISREGARD_INLINE_LIMITS in late inlining for functions with self recursive always inlines, since these grow large quick = and even non-recursive inlining is too slow. We also end up with quite ugly diagnostics of form: tt.c:13:1: error: inlining failed in call to =E2=80=98always_inline=E2=80= =99 =E2=80=98f1=E2=80=99: --param max-inline-insns-auto limit reached 13 | f1 (void) | ^~ tt.c:17:3: note: called from here 17 | f1 (); | ^~~~~ tt.c:6:1: error: inlining failed in call to =E2=80=98always_inline=E2=80=99= =E2=80=98f0=E2=80=99: --param max-inline-insns-auto limit reached 6 | f0 (void) | ^~ tt.c:16:3: note: called from here 16 | f0 (); | ^~~~~ tt.c:13:1: error: inlining failed in call to =E2=80=98always_inline=E2=80= =99 =E2=80=98f1=E2=80=99: --param max-inline-insns-auto limit reached 13 | f1 (void) | ^~ tt.c:15:3: note: called from here 15 | f1 (); | ^~~~~ In function =E2=80=98f1=E2=80=99, inlined from =E2=80=98f0=E2=80=99 at tt.c:8:3, which is quite large so I can not add it to a testuiste. I will see if I c= an reduce this even more.=