From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A8EF23858401; Thu, 7 Mar 2024 03:25:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A8EF23858401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709781925; bh=CPl+AKFZPGILbBWdssGI8Yu+N/i42Fsds6KG7VaJ+sY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qmpymn5gq7CuCS9flQlZCYefVA3B+snMXGp5zwtyDZUEEeANIcmWD1UuyPEWbcuEh Txv2J3fnxyUfljwbkigL9Rd5HJfU8L7vBgmuYR0/gLc6NbUY1BE+SYkzqTFg2xL4Y8 cxMyM+vZsIYdqcj+ztW3cGqj7McBrRX+GChS+0pI= 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 03:25:25 +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: 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 #5 from Andrew Pinski --- (In reply to LIU Hao from comment #4)=20 > The only difference between the C99 `extern inline` and C++ `extern inlin= e` > is that the C++ external definition is COMDAT. Well not really. comdat changes heurstics here though. The reason being C++ inline functions are most likely smaller and should really be inlined. This= is all heurstics of inlining and figuring out locally in the TU that it might = not be called in another TU or not. Note GCC has not retuned its -Os heurstics for a long time because it has b= een decent enough for most folks and corner cases like this is almost never come up.=