Re: [C++ PATCH] Implement P0595R1 - so far as __builtin_is_constant_evaluated rather than std::is_constant_evaluated magic builtin

2018-08-06 Thread Jason Merrill
On Wed, Aug 1, 2018 at 7:07 PM, Jakub Jelinek wrote: > On Wed, Aug 01, 2018 at 12:35:09AM +1000, Jason Merrill wrote: >> On Mon, Jul 23, 2018 at 8:50 PM, Richard Biener >> wrote: >> > On Mon, Jul 23, 2018 at 12:28 PM Jakub Jelinek wrote: >> >> >> >> On Mon, Jul 23, 2018 at 12:17:42PM +0200,

Re: [C++ PATCH] Implement P0595R1 - so far as __builtin_is_constant_evaluated rather than std::is_constant_evaluated magic builtin

2018-08-01 Thread Jakub Jelinek
On Wed, Aug 01, 2018 at 12:35:09AM +1000, Jason Merrill wrote: > On Mon, Jul 23, 2018 at 8:50 PM, Richard Biener > wrote: > > On Mon, Jul 23, 2018 at 12:28 PM Jakub Jelinek wrote: > >> > >> On Mon, Jul 23, 2018 at 12:17:42PM +0200, Richard Biener wrote: > >> > > Bootstrapped/regtested on

Re: [C++ PATCH] Implement P0595R1 - so far as __builtin_is_constant_evaluated rather than std::is_constant_evaluated magic builtin

2018-07-31 Thread Jason Merrill
On Mon, Jul 23, 2018 at 8:50 PM, Richard Biener wrote: > On Mon, Jul 23, 2018 at 12:28 PM Jakub Jelinek wrote: >> >> On Mon, Jul 23, 2018 at 12:17:42PM +0200, Richard Biener wrote: >> > > Bootstrapped/regtested on x86_64-linux. >> > >> > Thanks for working on this. I wonder if we can completely

Re: [C++ PATCH] Implement P0595R1 - so far as __builtin_is_constant_evaluated rather than std::is_constant_evaluated magic builtin

2018-07-23 Thread Richard Biener
On Mon, Jul 23, 2018 at 12:28 PM Jakub Jelinek wrote: > > On Mon, Jul 23, 2018 at 12:17:42PM +0200, Richard Biener wrote: > > > Bootstrapped/regtested on x86_64-linux. > > > > Thanks for working on this. I wonder if we can completely hide this > > from the middle-end, without requiring defining

Re: [C++ PATCH] Implement P0595R1 - so far as __builtin_is_constant_evaluated rather than std::is_constant_evaluated magic builtin

2018-07-23 Thread Jakub Jelinek
On Mon, Jul 23, 2018 at 12:17:42PM +0200, Richard Biener wrote: > > Bootstrapped/regtested on x86_64-linux. > > Thanks for working on this. I wonder if we can completely hide this > from the middle-end, without requiring defining of c_dialect_cxx. > There is the BUILT_IN_FRONTEND class so you

Re: [C++ PATCH] Implement P0595R1 - so far as __builtin_is_constant_evaluated rather than std::is_constant_evaluated magic builtin

2018-07-23 Thread Richard Biener
On Sun, Jul 22, 2018 at 9:31 PM Jakub Jelinek wrote: > > Hi! > > As part of the PR86590 discussions that the current libstdc++ > __constant_string is extremely costly, because we don't fold the > __builtin_constant_p in the loop early enough and because Richard doesn't > want

[C++ PATCH] Implement P0595R1 - so far as __builtin_is_constant_evaluated rather than std::is_constant_evaluated magic builtin

2018-07-22 Thread Jakub Jelinek
Hi! As part of the PR86590 discussions that the current libstdc++ __constant_string is extremely costly, because we don't fold the __builtin_constant_p in the loop early enough and because Richard doesn't want __builtin_early_constant_p, this patch is an attempt to implement P0595R1 as a builtin