This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ PATCH for c++/84684, wrong caching when evaluating a constexpr function


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]