* Building libgccjit with -fno-semantic-interposition? ( was Re: 1.76% performance loss in VRP due to inlining)
[not found] ` <179E65E4-33E7-45F1-A7B3-755CA434D037@gmail.com>
@ 2024-04-30 21:48 ` David Malcolm
2024-05-02 7:40 ` Andrea Corallo
0 siblings, 1 reply; 3+ messages in thread
From: David Malcolm @ 2024-04-30 21:48 UTC (permalink / raw)
To: Richard Biener, Jason Merrill
Cc: Aldy Hernandez, GCC Mailing List, MacLeod, Andrew,
Antoni Boucher, Andrea Corallo, jit
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
> >
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Building libgccjit with -fno-semantic-interposition? ( was Re: 1.76% performance loss in VRP due to inlining)
2024-04-30 21:48 ` Building libgccjit with -fno-semantic-interposition? ( was Re: 1.76% performance loss in VRP due to inlining) David Malcolm
@ 2024-05-02 7:40 ` Andrea Corallo
2024-06-10 10:59 ` Sam James
0 siblings, 1 reply; 3+ messages in thread
From: Andrea Corallo @ 2024-05-02 7:40 UTC (permalink / raw)
To: David Malcolm, Richard Biener, Jason Merrill
Cc: Aldy Hernandez, GCC Mailing List, MacLeod, Andrew, Antoni Boucher, jit
> 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?
Hi David,
AFAIU in Emacs we are not relying on interposition of symbols.
Thanks
Andrea
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Building libgccjit with -fno-semantic-interposition? ( was Re: 1.76% performance loss in VRP due to inlining)
2024-05-02 7:40 ` Andrea Corallo
@ 2024-06-10 10:59 ` Sam James
0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2024-06-10 10:59 UTC (permalink / raw)
To: Andrea Corallo via Gcc
Cc: David Malcolm, Richard Biener, Jason Merrill, Andrea Corallo,
Aldy Hernandez, MacLeod, Andrew, Antoni Boucher, jit
Andrea Corallo via Gcc <gcc@gcc.gnu.org> writes:
>> 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?
>
> Hi David,
>
> AFAIU in Emacs we are not relying on interposition of symbols.
FWIW, I've built GCC (inc. libgccjit for Emacs) with
-fno-semantic-interposition for a few years now and had no issues.
It's worth considering, I think, given the above.
>
> Thanks
>
> Andrea
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-10 10:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CADzB+2=ptBaKFMj3zJgh-UM9Zuh0B8_RRmfVZhBESRFhkGQspA@mail.gmail.com>
[not found] ` <179E65E4-33E7-45F1-A7B3-755CA434D037@gmail.com>
2024-04-30 21:48 ` Building libgccjit with -fno-semantic-interposition? ( was Re: 1.76% performance loss in VRP due to inlining) David Malcolm
2024-05-02 7:40 ` Andrea Corallo
2024-06-10 10:59 ` Sam James
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).