Re: [PATCH 1/4][RFC] middle-end/90348 - add explicit birth

2022-02-09 Thread Michael Matz via Gcc-patches
Hello, On Wed, 9 Feb 2022, Richard Biener wrote: > > That breaks down when a birth is there (because it was otherwise > > reachable) but not on the taken path: > > > > if (nevertrue) > > goto start; > > goto forw; > > start: > > { > > int i; > > printf("not really

Re: [PATCH 1/4][RFC] middle-end/90348 - add explicit birth

2022-02-09 Thread Richard Biener via Gcc-patches
On Tue, 8 Feb 2022, Michael Matz wrote: > Hello, > > On Tue, 8 Feb 2022, Richard Biener wrote: > > > > int state = 2, *p, camefrom1 = 0; > > > for (;;) switch (state) { > > > case 1: > > > case 2: ; > > > int i; > > > if (state != 1) { p = i = 0; } > > > if (state == 1) {

Re: [PATCH 1/4][RFC] middle-end/90348 - add explicit birth

2022-02-09 Thread Michael Matz via Gcc-patches
Hey, On Tue, 8 Feb 2022, Joseph Myers wrote: > On Tue, 8 Feb 2022, Richard Biener via Gcc-patches wrote: > > > which I think is OK? That is, when the abstract machine > > arrives at 'int i;' then the previous content in 'i' goes > > away? Or would > > Yes, that's correct. "If an

Re: [PATCH 1/4][RFC] middle-end/90348 - add explicit birth

2022-02-08 Thread Joseph Myers
On Tue, 8 Feb 2022, Richard Biener via Gcc-patches wrote: > which I think is OK? That is, when the abstract machine > arrives at 'int i;' then the previous content in 'i' goes > away? Or would Yes, that's correct. "If an initialization is specified for the object, it is performed each time

Re: [PATCH 1/4][RFC] middle-end/90348 - add explicit birth

2022-02-08 Thread Michael Matz via Gcc-patches
Hello, On Tue, 8 Feb 2022, Richard Biener wrote: > > int state = 2, *p, camefrom1 = 0; > > for (;;) switch (state) { > > case 1: > > case 2: ; > > int i; > > if (state != 1) { p = i = 0; } > > if (state == 1) { (*p)++; return *p; } > > state = 1; > > continue; > > } > >

Re: [PATCH 1/4][RFC] middle-end/90348 - add explicit birth

2022-02-08 Thread Richard Biener via Gcc-patches
On Tue, 8 Feb 2022, Michael Matz wrote: > Hello, > > On Tue, 8 Feb 2022, Richard Biener wrote: > > > int foo(int always_true_at_runtime) > > { > > { > > int *p; > > if (always_true_at_runtime) > > goto after; > > lab: > > return *p; > > after: > > int i = 0; > > p =

Re: [PATCH 1/4][RFC] middle-end/90348 - add explicit birth

2022-02-08 Thread Michael Matz via Gcc-patches
Hello, On Tue, 8 Feb 2022, Richard Biener wrote: > int foo(int always_true_at_runtime) > { > { > int *p; > if (always_true_at_runtime) > goto after; > lab: > return *p; > after: > int i = 0; > p = > if (always_true_at_runtime) > goto lab; > } > return

Re: [PATCH 1/4][RFC] middle-end/90348 - add explicit birth

2022-02-08 Thread Eric Botcazou via Gcc-patches
> I don't think an option to go to pre-12 behavior is useful. I'll > postpone the series to stage1. FWIW fine with me. -- Eric Botcazou

Re: [PATCH 1/4][RFC] middle-end/90348 - add explicit birth

2022-02-07 Thread Richard Biener via Gcc-patches
On Mon, 7 Feb 2022, Joseph Myers wrote: > On Fri, 4 Feb 2022, Richard Biener via Gcc-patches wrote: > > > This adds explicit variable birth CLOBBERs in an attempt to fix > > PR90348 and duplicates. The birth / death CLOBBER pairs are > > used to compute liveness and conflicts for stack variable

Re: [PATCH 1/4][RFC] middle-end/90348 - add explicit birth

2022-02-07 Thread Joseph Myers
On Fri, 4 Feb 2022, Richard Biener via Gcc-patches wrote: > This adds explicit variable birth CLOBBERs in an attempt to fix > PR90348 and duplicates. The birth / death CLOBBER pairs are > used to compute liveness and conflicts for stack variable > coalescing where the lack of an explicit birth

Re: [PATCH 1/4][RFC] middle-end/90348 - add explicit birth

2022-02-06 Thread Richard Biener via Gcc-patches
On Sat, 5 Feb 2022, Eric Botcazou wrote: > > In the past stack sharing has been quite important for the linux > > kernel. So perhaps one of the tests we should do if we wanted to go > > forward in this cycle would be to test kernel builds to see if any start > > tripping over the stack space

Re: [PATCH 1/4][RFC] middle-end/90348 - add explicit birth

2022-02-05 Thread Eric Botcazou via Gcc-patches
> In the past stack sharing has been quite important for the linux > kernel. So perhaps one of the tests we should do if we wanted to go > forward in this cycle would be to test kernel builds to see if any start > tripping over the stack space diagnostics they've put in place over the > years.

Re: [PATCH 1/4][RFC] middle-end/90348 - add explicit birth

2022-02-05 Thread Jeff Law via Gcc-patches
On 2/4/2022 6:49 AM, Richard Biener via Gcc-patches wrote: This adds explicit variable birth CLOBBERs in an attempt to fix PR90348 and duplicates. The birth / death CLOBBER pairs are used to compute liveness and conflicts for stack variable coalescing where the lack of an explicit birth but

Re: [PATCH 1/4][RFC] middle-end/90348 - add explicit birth

2022-02-04 Thread Richard Biener via Gcc-patches
On Fri, 4 Feb 2022, Jakub Jelinek wrote: > On Fri, Feb 04, 2022 at 02:49:13PM +0100, Richard Biener wrote: > > Any comments? I have mixed feelings with proposing this for GCC 12 > > but like to hear from others as well. I didn't try to evaluate > > the quality of stack slot sharing before/after

Re: [PATCH 1/4][RFC] middle-end/90348 - add explicit birth

2022-02-04 Thread Jakub Jelinek via Gcc-patches
On Fri, Feb 04, 2022 at 02:49:13PM +0100, Richard Biener wrote: > Any comments? I have mixed feelings with proposing this for GCC 12 > but like to hear from others as well. I didn't try to evaluate > the quality of stack slot sharing before/after this change besides > fixing the testsuite

[PATCH 1/4][RFC] middle-end/90348 - add explicit birth

2022-02-04 Thread Richard Biener via Gcc-patches
This adds explicit variable birth CLOBBERs in an attempt to fix PR90348 and duplicates. The birth / death CLOBBER pairs are used to compute liveness and conflicts for stack variable coalescing where the lack of an explicit birth but instead use of first mention causes misrepresentation of