From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C68083858C36; Thu, 7 Mar 2024 17:08:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C68083858C36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709831289; bh=aV62LiOVfDnWQ/MEJg41IrpTcn8BfGUvFLRPilRFRqY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=KZzhRxogI/d68XbaZqFPG2TgbWfWRDsVTULaNM9qpgHgeSIHHsAsPoP5eOvp2Aycg TUEEO8Kk6cGGggBGHo29TsTF+gj3Ngox4SMGj7y1tYR43Hwai32MmnFVIyOU1hv2Na mT89v9x6HXLRV2IKEWJEm/SQ4GilLGEZvg5MhA/8= From: "lh_mouse at 126 dot com" 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 17:08:09 +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: lh_mouse at 126 dot com 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: 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 --- Comment #7 from LIU Hao --- (In reply to Jan Hubicka from comment #6) > > Note GCC has not retuned its -Os heurstics for a long time because it h= as been > > decent enough for most folks and corner cases like this is almost never= come > > up. > There were quite few changes to -Os heuristics :) > One of bigger challenges is that we do see more and more C++ code built > with -Os which relies on certain functions to be inlined and optimized > in context, so we had to get more optimistic in a hope that inlined code > will optimize well. >=20 > COMDAT functions are more likely inlined because statistics shows that > many of them are not really shared between translations units > (see -param=3Dcomdat-sharing-probability parameter). This was necessary to > get reasonable code for Firefox approx 15 years ago. So is there no way to get the C99 extern inline behavior? i.e. sibling call= s to gnu_inline functions are inlined even when optimizing for size.=