think we need the added parameter for
scalar_constant_value.
Hmm, I guess it should always be cheap to unshare an scalar initializer.
So consider the parameter removed for scalar_constant_value.
-- >8 --
Subject: [PATCH] c++: decl_constant_value and unsharing [PR96197]
In the testcase
ee routines that controls unsharing (except for
> > > decl_constant_value, which instead needs a new overload if we don't want
> > > to touch its common declaration in c-common.h.) Bootstrap and regtest
> > > in progress.
> >
> > That looks good, though
, this patch also moves the call to unshare_expr in
> > constant_value_1 outside of the loop, since calling unshare_expr on a
> > DECL_P should be a no-op.
> >
> > Additionally, in unify there is one call to scalar_constant_value that
> > seems to be dead code since we ap
don't want
to touch its common declaration in c-common.h.) Bootstrap and regtest
in progress.
That looks good, though I don't think we need the added parameter for
scalar_constant_value.
-- >8 --
Subject: [PATCH] c++: decl_constant_value and unsharing [PR96197]
In the testcase
tines that controls unsharing (except for
decl_constant_value, which instead needs a new overload if we don't want
to touch its common declaration in c-common.h.) Bootstrap and regtest
in progress.
-- >8 --
Subject: [PATCH] c++: decl_constant_value and unsharing [PR96197]
In the testcase
On 7/21/20 3:07 PM, Patrick Palka wrote:
In the testcase from the PR we are seeing excessive memory use (> 5GB)
during constexpr evaluation, almost all of which is due to the call to
decl_constant_value in the VAR_DECL/CONST_DECL branch of
cxx_eval_constant_expression. We reach here every time w
testcase in the PR falls from 5GB to 15MB according to -ftime-report.
> >
> > Bootstrapped and regtested on x86_64-pc-linux-gnu, and also tested on
> > cmcstl2 and a number of other libraries. Does this look OK to commit?
>
> Can you add the PRs testcase? Thanks for track
On Tue, Jul 21, 2020 at 9:08 PM Patrick Palka via Gcc-patches
wrote:
>
> In the testcase from the PR we are seeing excessive memory use (> 5GB)
> during constexpr evaluation, almost all of which is due to the call to
> decl_constant_value in the VAR_DECL/CONST_DECL branch of
> cxx_eval_constant_ex
In the testcase from the PR we are seeing excessive memory use (> 5GB)
during constexpr evaluation, almost all of which is due to the call to
decl_constant_value in the VAR_DECL/CONST_DECL branch of
cxx_eval_constant_expression. We reach here every time we evaluate an
ARRAY_REF of a constexpr VAR_