From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8FB683857C4A; Thu, 7 Mar 2024 02:57:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8FB683857C4A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709780252; bh=CSmPVL8mJ0YbSYZg2Hel1/zyrJ4J/rMslrnve/gjAc4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YF14N4lAlLFOnbgjJ309oHaGWu1ARj+OLHrf692q9cgAhiXouVll2eVjE/MyRhASA nwM/d7+fDGnraU0V+PfnFJ2OHtCnIswrbE6NtRpiW80mTQDJ6+udtYf2ghtoBcuYqF MSJZyF/xyh0sVB8vca+YbMckXg/x1i/HirNljvpo= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/114262] Over-inlining when optimizing for size with gnu_inline function Date: Thu, 07 Mar 2024 02:57:32 +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: documentation X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords 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=3D114262 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |documentation --- Comment #3 from Andrew Pinski --- The C++ front-end does: /* Handle gnu_inline attribute. */ if (GNU_INLINE_P (decl1)) { DECL_EXTERNAL (decl1) =3D 1; DECL_NOT_REALLY_EXTERN (decl1) =3D 0; DECL_INTERFACE_KNOWN (decl1) =3D 1; DECL_DISREGARD_INLINE_LIMITS (decl1) =3D 1; } C front-end does: /* For GNU C extern inline functions disregard inline limits. */ if (DECL_EXTERNAL (fndecl) && DECL_DECLARED_INLINE_P (fndecl) && (flag_gnu89_inline || lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (fndecl)))) DECL_DISREGARD_INLINE_LIMITS (fndecl) =3D 1; This specifically from r0-82849-gc536a6a77a19a8 but it was done different before that (using a language hook). https://gcc.gnu.org/pipermail/gcc-patches/2007-July/221806.html https://gcc.gnu.org/pipermail/gcc-patches/2007-August/223406.html It looks like it has been this way since r0-37737-g4838c5ee553f06 (2001) (or rather that is when it was used by the tree inline; I don't want to dig fur= ther back to understand the RTL inliner). So looks like this is just missing documentation ...=