From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E2379385781B; Thu, 26 Aug 2021 08:56:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E2379385781B From: "linkw at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/102059] Incorrect always_inline diagnostic in LTO mode with #pragma GCC target("cpu=power10") Date: Thu, 26 Aug 2021 08:56:10 +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: 11.2.1 X-Bugzilla-Keywords: diagnostic, lto, rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: linkw at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: linkw 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: Thu, 26 Aug 2021 08:56:11 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102059 --- Comment #14 from Kewen Lin --- (In reply to Richard Biener from comment #11) > Note that x86 uses for example >=20 > else if (caller_opts->x_ix86_fpmath !=3D callee_opts->x_ix86_fpmath > /* If the calle doesn't use FP expressions differences in > ix86_fpmath can be ignored. We are called from FEs > for multi-versioning call optimization, so beware of > ipa_fn_summaries not available. */ > && (! ipa_fn_summaries > || ipa_fn_summaries->get (callee_node) =3D=3D NULL > || ipa_fn_summaries->get (callee_node)->fp_expressions)) > ret =3D false; >=20 > I wonder if we need to give targets the ability to compute IPA inline > summary bits, like "uses HTM" or "uses intrinsics for ISA X", to > selectively ignore bits that are not actually used. >=20 Thanks for the example, it looks useful! Now the field fp_expressions is generic, one target specific summary class seems required then. And not sur= e if the users still have interests/senses to further try flto when they fail to= get expected inlining with some basic optimization options. :)=