From: David Malcolm <dmalcolm@redhat.com>
To: Richard Biener <richard.guenther@gmail.com>,
Jason Merrill <jason@redhat.com>
Cc: Aldy Hernandez <aldyh@redhat.com>,
GCC Mailing List <gcc@gcc.gnu.org>,
"MacLeod, Andrew" <amacleod@redhat.com>,
Antoni Boucher <bouanto@zoho.com>,
Andrea Corallo <andrea.corallo@arm.com>,
jit@gcc.gnu.org
Subject: Building libgccjit with -fno-semantic-interposition? ( was Re: 1.76% performance loss in VRP due to inlining)
Date: Tue, 30 Apr 2024 17:48:25 -0400 [thread overview]
Message-ID: <342ee000a97aa485f4f1d83d880bf9af80eae11e.camel@redhat.com> (raw)
In-Reply-To: <179E65E4-33E7-45F1-A7B3-755CA434D037@gmail.com>
On Tue, 2024-04-30 at 21:15 +0200, Richard Biener via Gcc wrote:
>
>
> > Am 30.04.2024 um 21:11 schrieb Jason Merrill via Gcc
> > <gcc@gcc.gnu.org>:
> >
> > On Fri, Apr 26, 2024 at 5:44 AM Aldy Hernandez via Gcc
> > <gcc@gcc.gnu.org> wrote:
> > >
> > > In implementing prange (pointer ranges), I have found a 1.74%
> > > slowdown
> > > in VRP, even without any code path actually using the code. I
> > > have
> > > tracked this down to irange::get_bitmask() being compiled
> > > differently
> > > with and without the bare bones patch. With the patch,
> > > irange::get_bitmask() has a lot of code inlined into it,
> > > particularly
> > > get_bitmask_from_range() and consequently the wide_int_storage
> > > code.
> > ...
> > > +static irange_bitmask
> > > +get_bitmask_from_range (tree type,
> > > + const wide_int &min, const wide_int &max)
> > ...
> > > -irange_bitmask
> > > -irange::get_bitmask_from_range () const
> >
> > My guess is that this is the relevant change: the old function has
> > external linkage, and is therefore interposable, which inhibits
> > inlining. The new function has internal linkage, which allows
> > inlining.
> >
> > Relatedly, I wonder if we want to build GCC with -fno-semantic-
> > interposition?
>
> I guess that’s a good idea, though it’s already implied when doing
> LTO bootstrap and building cc1 and friends? (But not for libgccjit?)
[CCing jit mailing list]
FWIW I've no idea if any libgccjit users are using semantic
interposition; I suspect the answer is "no one is using it".
Antoyo, Andrea [also CCed]: are either of you using semantic
interposition of symbols within libgccjit?
If not, we *might* get a slightly faster libgccjit by building it with
-fno-semantic-interposition. Or maybe not...
Dave
>
> Richard
>
> >
> > Jason
> >
>
next prev parent reply other threads:[~2024-04-30 21:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-26 9:42 1.76% performance loss in VRP due to inlining Aldy Hernandez
2024-04-30 7:57 ` Richard Biener
2024-04-30 8:21 ` Aldy Hernandez
2024-04-30 8:53 ` Martin Jambor
2024-04-30 19:09 ` Jason Merrill
2024-04-30 19:15 ` Richard Biener
2024-04-30 21:48 ` David Malcolm [this message]
2024-05-02 7:40 ` Building libgccjit with -fno-semantic-interposition? ( was Re: 1.76% performance loss in VRP due to inlining) Andrea Corallo
2024-04-30 19:22 ` 1.76% performance loss in VRP due to inlining Jakub Jelinek
2024-04-30 21:37 ` Jason Merrill
2024-05-03 8:55 ` Aldy Hernandez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=342ee000a97aa485f4f1d83d880bf9af80eae11e.camel@redhat.com \
--to=dmalcolm@redhat.com \
--cc=aldyh@redhat.com \
--cc=amacleod@redhat.com \
--cc=andrea.corallo@arm.com \
--cc=bouanto@zoho.com \
--cc=gcc@gcc.gnu.org \
--cc=jason@redhat.com \
--cc=jit@gcc.gnu.org \
--cc=richard.guenther@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).