From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 68C6A3838F0D; Fri, 9 Dec 2022 14:55:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 68C6A3838F0D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1670597757; bh=3n5AUraCddf1IOKldmQu0YjU/OUneySIQrMqsqb4ZJI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nielzdRNXzq33+q7l+e0E+wHRHPenLsofvB3JcHCFjjQ9T629+PadAJ7IxEgRkVP8 6TQ/LWnkX5CzwtXqs1a8IYpOW5MX+y72/3Tz1YCzOXnAKsaJAJDhlWYxhjoyCIexYU la6ikZmW1eK2Seq+NbfXW7LBnCVfdghFJB9MCrVs= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/108030] `std::experimental::simd` not inlined Date: Fri, 09 Dec 2022 14:55:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mkretz at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 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=3D108030 --- Comment #4 from Jakub Jelinek --- (In reply to Matthias Kretz (Vir) from comment #3) > (In reply to Jakub Jelinek from comment #2) > > I bet by adding too many always_inline functions that call normal inlin= es > > that is what is bound to happen, one runs into inline growth limits. I= t is > > better to use always_inline on the leaf functions rather than on what c= alls > > them. >=20 > How is the inline growth limit determined? I mean, in the cases where it > really hurts, the resulting function compiles down to a single instruction > (plus parameter passing boilerplate). The optimizer cannot know about the > number of instructions, so what is the measure it uses? I've CCed Honza, who should know the answers. The inliner can't know if say some builtin will fold into a single instruct= ion or not, it uses some heuristics on GIMPLE IL sizes. Bet -fdump-ipa-inline-details contain all the reasons, but at least for me those dumps are hard to read.=