;s
non-standard). I suppose it also doesn't hurt to verify that the
return
and argument type of the function are sane before we commit to
folding.
-- >8 --
Subject: [PATCH] c++: fold calls to std::move/forward [PR96780]
A well-formed call to std::move/forward is equivalent to a cast, but
std_move_p, is_std_forward_p): Export.
> > > > > > > >
> > > > > > > > gcc/testsuite/ChangeLog:
> > > > > > > >
> > > > > > > > * g++.dg/opt/pr96780.C: New test.
> > > > > > >
ment type of the function are sane before we commit to folding.
-- >8 --
Subject: [PATCH] c++: fold calls to std::move/forward [PR96780]
A well-formed call to std::move/forward is equivalent to a cast, but the
former being a function call means the compiler generates debug info for
it, which pers
k.cc | 6 ++----
> > > > > > gcc/testsuite/g++.dg/opt/pr96780.C | 24
> > > > > > 4 files changed, 46 insertions(+), 4 deletions(-)
> > > > > > create mode 100644 gcc/testsuite/g++.dg/opt/pr96780.C
#x27;t add front-end options to the
default_options_table. But I think let's use OPTION_SET_P instead of
checking for -1.
-- >8 --
Subject: [PATCH] c++: fold calls to std::move/forward [PR96780]
A well-formed call to std::move/forward is equivalent to a cast, but the
former being a f
96780.C
> > > >
> > > > diff --git a/gcc/cp/cp-gimplify.cc b/gcc/cp/cp-gimplify.cc
> > > > index d7323fb5c09..0b009b631c7 100644
> > > > --- a/gcc/cp/cp-gimplify.cc
> > > > +++ b/gcc/cp/cp-gimplify.cc
> > > > @@ -2756,6 +2756,
of unsure about since it's
non-standard). I suppose it also doesn't hurt to verify that the return
and argument type of the function are sane before we commit to folding.
-- >8 --
Subject: [PATCH] c++: fold calls to std::move/forward [PR96780]
A well-formed call to std::move/forward is e
On Thu, 10 Mar 2022 at 15:27, Patrick Palka wrote:
> Here's a patch that extends the folding to as_const and addressof (as
> well as __addressof, which I'm kind of unsure about since it's
> non-standard).
N.B. libstdc++ almost never uses std::addressof, because that calls
std::__addressof, so we j
gt; > +++ b/gcc/cp/cp-gimplify.cc
> > @@ -2756,6 +2756,24 @@ cp_fold (tree x)
> > case CALL_EXPR:
> > {
> > + if (optimize
>
> I think this should check flag_no_inline rather than optimize.
Sounds good.
Here's a patch that extends the fol
On 3/1/22 18:08, Patrick Palka wrote:
A well-formed call to std::move/forward is equivalent to a cast, but the
former being a function call means it comes with bloated debug info, which
persists even after the call has been inlined away, for an operation that
is never interesting to debug.
This
A well-formed call to std::move/forward is equivalent to a cast, but the
former being a function call means it comes with bloated debug info, which
persists even after the call has been inlined away, for an operation that
is never interesting to debug.
This patch addresses this problem in a relati
11 matches
Mail list logo