Re: [c++-delayed-folding] fold_simple

2015-09-01 Thread Kai Tietz
2015-09-01 10:15 GMT+02:00 Kai Tietz : > 2015-08-31 22:19 GMT+02:00 Kai Tietz : >> 2015-08-31 21:43 GMT+02:00 Kai Tietz : >>> 2015-08-31 21:29 GMT+02:00 Jason Merrill : On 08/31/2015 03:08 PM, Kai

Re: [c++-delayed-folding] fold_simple

2015-09-01 Thread Kai Tietz
2015-08-31 22:19 GMT+02:00 Kai Tietz : > 2015-08-31 21:43 GMT+02:00 Kai Tietz : >> 2015-08-31 21:29 GMT+02:00 Jason Merrill : >>> On 08/31/2015 03:08 PM, Kai Tietz wrote: I will need to verify that this patch doesn't

Re: [c++-delayed-folding] fold_simple

2015-09-01 Thread Kai Tietz
2015-09-01 10:43 GMT+02:00 Kai Tietz : > 2015-09-01 10:15 GMT+02:00 Kai Tietz : >> 2015-08-31 22:19 GMT+02:00 Kai Tietz : >>> 2015-08-31 21:43 GMT+02:00 Kai Tietz : 2015-08-31 21:29 GMT+02:00

Re: [c++-delayed-folding] fold_simple

2015-09-01 Thread Jason Merrill
On 08/31/2015 03:43 PM, Kai Tietz wrote: 2015-08-31 21:29 GMT+02:00 Jason Merrill : On 08/31/2015 03:08 PM, Kai Tietz wrote: I will need to verify that this patch doesn't introduce regressions. The wacky thing here is the encapsulation of overflowed-arguments in

Re: [c++-delayed-folding] fold_simple

2015-09-01 Thread Kai Tietz
2015-09-01 13:17 GMT+02:00 Kai Tietz : > 2015-09-01 10:43 GMT+02:00 Kai Tietz : >> 2015-09-01 10:15 GMT+02:00 Kai Tietz : >>> 2015-08-31 22:19 GMT+02:00 Kai Tietz : 2015-08-31 21:43 GMT+02:00

Re: [c++-delayed-folding] fold_simple

2015-09-01 Thread Jason Merrill
On 09/01/2015 11:27 AM, Kai Tietz wrote: I rewrote binary/unary overflow-check logic so, that we avoid double checking-s. I think this address things as you intend, beside the checking for constant value. We would need to check for *_CST tree-codes. Is there a macro we could use, which is

Re: [c++-delayed-folding] fold_simple

2015-09-01 Thread Kai Tietz
2015-09-01 16:47 GMT+02:00 Jason Merrill : > On 08/31/2015 03:43 PM, Kai Tietz wrote: >> >> 2015-08-31 21:29 GMT+02:00 Jason Merrill : >>> >>> On 08/31/2015 03:08 PM, Kai Tietz wrote: I will need to verify that this patch doesn't introduce

Re: [c++-delayed-folding] fold_simple

2015-09-01 Thread Kai Tietz
2015-09-01 17:31 GMT+02:00 Jason Merrill : > On 09/01/2015 11:27 AM, Kai Tietz wrote: >> >> I rewrote binary/unary overflow-check logic so, that we avoid double >> checking-s. I think this address things as you intend, beside the >> checking for constant value. We would need to

Re: [c++-delayed-folding] fold_simple

2015-08-31 Thread Jason Merrill
On 08/29/2015 10:10 AM, Kai Tietz wrote: Hmm, I don't think we want to call maybe_constant_value in functions like cp_build_binary_op. We are interested in overflow only on constant-values anyway, I don't see that we want to have here any constexpr-logic, nor specific address-manipulation logic.

Re: [c++-delayed-folding] fold_simple

2015-08-31 Thread Kai Tietz
2015-08-31 19:52 GMT+02:00 Jason Merrill : > On 08/29/2015 10:10 AM, Kai Tietz wrote: >> >> Hmm, I don't think we want to call maybe_constant_value in functions >> like cp_build_binary_op. We are interested in overflow only on >> constant-values anyway, I don't see that we want

Re: [c++-delayed-folding] fold_simple

2015-08-31 Thread Jason Merrill
On 08/31/2015 03:08 PM, Kai Tietz wrote: I will need to verify that this patch doesn't introduce regressions. The wacky thing here is the encapsulation of overflowed-arguments in maybe_constant_value function by nop-expr. Do we need to worry about that? If one of the operands is overflowed,

Re: [c++-delayed-folding] fold_simple

2015-08-31 Thread Kai Tietz
2015-08-31 21:29 GMT+02:00 Jason Merrill : > On 08/31/2015 03:08 PM, Kai Tietz wrote: >> >> I will need to verify that this patch doesn't introduce regressions. >> The wacky thing here is the encapsulation of overflowed-arguments in >> maybe_constant_value function by nop-expr. >

Re: [c++-delayed-folding] fold_simple

2015-08-31 Thread Kai Tietz
2015-08-31 21:43 GMT+02:00 Kai Tietz : > 2015-08-31 21:29 GMT+02:00 Jason Merrill : >> On 08/31/2015 03:08 PM, Kai Tietz wrote: >>> >>> I will need to verify that this patch doesn't introduce regressions. >>> The wacky thing here is the encapsulation of

Re: [c++-delayed-folding] fold_simple

2015-08-29 Thread Kai Tietz
2015-08-29 6:45 GMT+02:00 Jason Merrill ja...@redhat.com: On 08/27/2015 05:21 AM, Kai Tietz wrote: 2015-08-27 4:57 GMT+02:00 Jason Merrill ja...@redhat.com: Why does fold_simple fold so many patterns? I thought we wanted something that would just fold conversions and negations of constant

Re: [c++-delayed-folding] fold_simple

2015-08-28 Thread Jason Merrill
On 08/27/2015 05:21 AM, Kai Tietz wrote: 2015-08-27 4:57 GMT+02:00 Jason Merrill ja...@redhat.com: Why does fold_simple fold so many patterns? I thought we wanted something that would just fold conversions and negations of constant values. Yes, initial variant was handling much less

Re: [c++-delayed-folding] fold_simple

2015-08-27 Thread Richard Biener
On August 27, 2015 6:07:59 PM GMT+02:00, Kai Tietz ktiet...@googlemail.com wrote: 2015-08-27 12:34 GMT+02:00 Richard Biener richard.guent...@gmail.com: On Thu, Aug 27, 2015 at 11:21 AM, Kai Tietz ktiet...@googlemail.com wrote: 2015-08-27 4:57 GMT+02:00 Jason Merrill ja...@redhat.com: Why does

Re: [c++-delayed-folding] fold_simple

2015-08-27 Thread Kai Tietz
2015-08-27 12:34 GMT+02:00 Richard Biener richard.guent...@gmail.com: On Thu, Aug 27, 2015 at 11:21 AM, Kai Tietz ktiet...@googlemail.com wrote: 2015-08-27 4:57 GMT+02:00 Jason Merrill ja...@redhat.com: Why does fold_simple fold so many patterns? I thought we wanted something that would just

Re: [c++-delayed-folding] fold_simple

2015-08-27 Thread Richard Biener
On Thu, Aug 27, 2015 at 11:21 AM, Kai Tietz ktiet...@googlemail.com wrote: 2015-08-27 4:57 GMT+02:00 Jason Merrill ja...@redhat.com: Why does fold_simple fold so many patterns? I thought we wanted something that would just fold conversions and negations of constant values. Yes, initial

Re: [c++-delayed-folding] fold_simple

2015-08-27 Thread Kai Tietz
2015-08-27 4:57 GMT+02:00 Jason Merrill ja...@redhat.com: Why does fold_simple fold so many patterns? I thought we wanted something that would just fold conversions and negations of constant values. Yes, initial variant was handling much less patterns. But actually we need for functions (eg.

[c++-delayed-folding] fold_simple

2015-08-26 Thread Jason Merrill
Why does fold_simple fold so many patterns? I thought we wanted something that would just fold conversions and negations of constant values. Jason