From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 78D03388A414; Tue, 28 Jun 2022 13:25:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 78D03388A414 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/101279] Function attributes often block inlining Date: Tue, 28 Jun 2022 13:25:46 +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: 12.0 X-Bugzilla-Keywords: documentation, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: NEW 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jun 2022 13:25:46 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101279 --- Comment #6 from rguenther at suse dot de --- > Am 28.06.2022 um 14:53 schrieb david at westcontrol dot com : >=20 > =EF=BB=BFhttps://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101279 >=20 > --- Comment #5 from David Brown --- > (In reply to Richard Biener from comment #4) >> (In reply to frankhb1989 from comment #3) >>> There is a more specific instance here: can_inline_edge_by_limits_p in >>> ipa-inline.cc treats flags and "optimize" attributes differently. >>=20 >> A bit up there's a blacklist we maintain where inlining is not OK becaus= e it >> results in semantic differences. >>=20 >> Generally we it's hard to second-guess the users intention when looking >> at an inline edge with different optimization settings of caller and cal= lee. >> For C++ comdats there might be even multiple variants with different >> optimization level (but we only keep one, special-casing this a bit). >=20 > I appreciate the "err on the side of caution" attitude. Perhaps there co= uld be > an extra "I know what I'm doing" attribute that lets you override the > blacklisting in a particular case. This would only really make sense in = cases > where the attribute can be attached to the expressions and statements wit= hin > the function (I think "-fwrapv" would be in this category). In cases whe= re > this is not possible, an error or warning message would be in order as the > compiler can't do what the programmer is asking. Can you provide a specific example that you would allow this way? > --=20 > You are receiving this mail because: > You are on the CC list for the bug.=