Re: replacing the VRP threader

2021-09-22 Thread Aldy Hernandez via Gcc
On Tue, Sep 21, 2021 at 12:48 PM Aldy Hernandez  wrote:

> SUMMARY
> ===
>
> The hybrid threader gets 14.5% more jump threads than the legacy code,
> but most of these threads are at the expense of other threading passes.
> The more it gets, the less DOM and the backward threader get.  That
> being said, there is a total improvement of 0.87% jump threads in the
> total compilation.

Well, it turns out we're considerably better than reported.

Andrew just found a one-line change in the path solver that improves
our VRP threading goodness to 18.5% and our overall jump threading
gains to 1.28%.

Yay!
Aldy



[RISCV][CANCELED] RISC-V GNU Toolchain Biweekly Sync-up call (Sept 23, 2021)

2021-09-22 Thread 吴伟
Hi all,

FYI The next RISC-V GNU Toolchain Biweekly Sync is cancelled because
most of us are attending Linux Plumber Conf 2021.

-- 
Best wishes,
Wei Wu (吴伟)


Re: [libc-coord] Add new ABI '__memcmpeq()' to libc

2021-09-22 Thread Christoph Müllner via Gcc
Would it make sense to extend this proposal to include __strcmpeq()
and __strncmpeq()?

Both are already available internally in GCC in form of
BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ
(tree-ssa-strlen.c detects them in handle_builtin_string_cmp() and
builtins.c tries to inline them in expand_builtin_memcmp()).
However, they are currently restricted to cases where the length of
the string or the size of the array (of both arguments) is known.

A use case for strcmpeq() would be the comparison of std::type_info
objects (equality and inequality operator) in libstdc++.

On Tue, Sep 21, 2021 at 9:54 PM Noah Goldstein via Gcc  wrote:
>
> On Fri, Sep 17, 2021 at 9:27 AM Florian Weimer via Libc-alpha <
> libc-al...@sourceware.org> wrote:
>
> > * Joseph Myers:
> >
> > > I was supposing a build-time decision (using
> > GCC_GLIBC_VERSION_GTE_IFELSE
> > > to know if the glibc version on the target definitely has this
> > function).
> > > But if we add a header declaration, you could check for __memcmpeq being
> > > declared (and so cover arbitrary C libraries, not just glibc, and avoid
> > > issues of needing to disable this logic for freestanding compilations,
> > > which would otherwise be an issue if a glibc-target toolchain is used
> > for
> > > a freestanding kernel compilation).  The case of people calling
> > > __builtin_memcmp (or declaring memcmp themselves) without string.h
> > > included probably isn't one it's important to optimize.
> >
> > The header-less case looks relevant to C++ and other language front
> > ends, though.  So a GCC_GLIBC_VERSION_GTE_IFELSE check could still make
> > sense for them.
> >
> > (Dropping libc-coord.)
> >
> > Thanks,
> > Florian
> >
> >
> What are we going with?
>
> Should I go forward with the proposal in GLIBC?
>
> If I should go forward with it should I include a def in string.h?


Re: [libc-coord] Add new ABI '__memcmpeq()' to libc

2021-09-22 Thread Noah Goldstein via Gcc
On Wed, Sep 22, 2021 at 12:46 PM Christoph Müllner 
wrote:

> Would it make sense to extend this proposal to include __strcmpeq()
> and __strncmpeq()?
>
> Both are already available internally in GCC in form of
> BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ
> (tree-ssa-strlen.c detects them in handle_builtin_string_cmp() and
> builtins.c tries to inline them in expand_builtin_memcmp()).
> However, they are currently restricted to cases where the length of
> the string or the size of the array (of both arguments) is known.
>
> A use case for strcmpeq() would be the comparison of std::type_info
> objects (equality and inequality operator) in libstdc++.
>
> I agree and am happy to implement them along side __memcmpeq()
if the proposal is accepted. Do they need a seperate writeup with full
specifications?


> On Tue, Sep 21, 2021 at 9:54 PM Noah Goldstein via Gcc 
> wrote:
> >
> > On Fri, Sep 17, 2021 at 9:27 AM Florian Weimer via Libc-alpha <
> > libc-al...@sourceware.org> wrote:
> >
> > > * Joseph Myers:
> > >
> > > > I was supposing a build-time decision (using
> > > GCC_GLIBC_VERSION_GTE_IFELSE
> > > > to know if the glibc version on the target definitely has this
> > > function).
> > > > But if we add a header declaration, you could check for __memcmpeq
> being
> > > > declared (and so cover arbitrary C libraries, not just glibc, and
> avoid
> > > > issues of needing to disable this logic for freestanding
> compilations,
> > > > which would otherwise be an issue if a glibc-target toolchain is used
> > > for
> > > > a freestanding kernel compilation).  The case of people calling
> > > > __builtin_memcmp (or declaring memcmp themselves) without string.h
> > > > included probably isn't one it's important to optimize.
> > >
> > > The header-less case looks relevant to C++ and other language front
> > > ends, though.  So a GCC_GLIBC_VERSION_GTE_IFELSE check could still make
> > > sense for them.
> > >
> > > (Dropping libc-coord.)
> > >
> > > Thanks,
> > > Florian
> > >
> > >
> > What are we going with?
> >
> > Should I go forward with the proposal in GLIBC?
> >
> > If I should go forward with it should I include a def in string.h?
>