From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9EAE13857C4D; Thu, 7 Mar 2024 15:55:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9EAE13857C4D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709826939; bh=GfCFkeuTlZI6CJ6sUSCaZAichMGwaH9q2FBiXhx7rN4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=k8p/bI/62bO6IkiQeEnlYQNmnTJumxND9KSwUxSraMHeowm49TLv5aCm1R4U37sgE q3EKKhwTJMPQD+UDCwn+MAn7qWjskOyPon3mmnWUAgG58oitJNp+JAnzWVd3DWiMKO nKG0oxA4Ru4KfmCdUHgBAJsMiF3nBto06h846cnE= From: "hubicka at ucw dot cz" 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 15:55:39 +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: hubicka at ucw dot cz 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 #6 from Jan Hubicka --- > Note GCC has not retuned its -Os heurstics for a long time because it has= been > decent enough for most folks and corner cases like this is almost never c= ome > 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. 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.=