This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH for c++/84684, wrong caching when evaluating a constexpr function
- From: Jason Merrill <jason at redhat dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jakub Jelinek <jakub at redhat dot com>
- Date: Wed, 7 Mar 2018 10:16:31 -0500
- Subject: Re: C++ PATCH for c++/84684, wrong caching when evaluating a constexpr function
- Authentication-results: sourceware.org; auth=none
- References: <20180306181342.GE7043@redhat.com> <CADzB+2=ikvff6SXOM7agNxOBGMdSjq9D7M5LtWj7k+hjxxs6Bw@mail.gmail.com> <20180306204808.GF7043@redhat.com>
On Tue, Mar 6, 2018 at 3:48 PM, Marek Polacek <polacek@redhat.com> wrote:
> On Tue, Mar 06, 2018 at 03:39:36PM -0500, Jason Merrill wrote:
>> On Tue, Mar 6, 2018 at 1:13 PM, Marek Polacek <polacek@redhat.com> wrote:
>> > But I'm also wondering about massage_init_elt. It has
>> > tree t = fold_non_dependent_expr (init);
>> > t = maybe_constant_init (t);
>> > but given that fold_non_dependent_expr now calls maybe_constant_value, which
>> > then causes that we try to cache the calls above, this seems excessive,
>> > wouldn't we be better off with just calling fold_non_dependent_init as
>> > discussed recently?
>>
>> Probably.
>
> Do you want me to try it for GCC 8 or should we table it for GCC 9?
> I would think the latter since it's not a regression, just an optimization.
Agreed.
Jason