From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 315E63858D1E; Mon, 6 May 2024 02:23:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 315E63858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1714962201; bh=Jgx3AN6FeJneN8FzzpSiJP/8lfanWkH3ZiUPwuCnCDg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RtbVwWGP3So9XIXpCG3+Fq11t4Uky+sUQ1Ny3jBNZMmm7lvFFLruo+4PhBr3qHL5H zxsEi5xKMwvRGQJURHvhI+x/1PLnKDf8pWSmpRlJ7vGqKRa/wn7sd+2KziZFMewphV swf0n4TAoBBsPeyIDTEvQ7faph6Nuzf0iL89YE58= From: "elrodc at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/93008] Need a way to make inlining heuristics ignore whether a function is inline Date: Mon, 06 May 2024 02:23:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: elrodc at gmail 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=3D93008 --- Comment #14 from Chris Elrod --- To me, an "inline" function is one that the compiler inlines. It just happens that the `inline` keyword also means both comdat semantics,= and possibly hiding the symbol to make it internal (-fvisibility-inlines-hidden= ). It also just happens to be the case that the vast majority of the time I ma= rk a function `inline`, it is because of this, not because of the compiler hint. `static` of course also specifies internal linkage, but I generally prefer = the comdat semantics: I'd rather merge than duplicate the definitions. If there is a new keyword or pragma meaning comdat semantics (and preferably also specifying internal linkage), I would rather have the name reference t= hat. I'd rather have a positive name about what it does, than negative: "quasi_inline: like inline, except it does everything inline does except the inline part". Why define as a set diff -- naming it after the thing it does not do! -- if= you could define it in the affirmative, based on what it does in the first plac= e?=