Re: [PATCH] middle-end/106075 - non-call EH and DSE

2023-01-18 Thread Richard Biener via Gcc-patches
On Wed, 18 Jan 2023, Jan Hubicka wrote: > > On Tue, 17 Jan 2023, Jan Hubicka wrote: > > > > > > > We don't use same argumentation about other control flow statements. > > > > > The following: > > > > > > > > > > fn() > > > > > { > > > > > try { > > > > > i_read_no_global_memory (); > > > >

Re: [PATCH] middle-end/106075 - non-call EH and DSE

2023-01-18 Thread Jan Hubicka via Gcc-patches
> On Tue, 17 Jan 2023, Jan Hubicka wrote: > > > > > We don't use same argumentation about other control flow statements. > > > > The following: > > > > > > > > fn() > > > > { > > > > try { > > > > i_read_no_global_memory (); > > > > } catch (...) > > > > { > > > > reutrn 1; > > > >

Re: [PATCH] middle-end/106075 - non-call EH and DSE

2023-01-18 Thread Richard Biener via Gcc-patches
On Tue, 17 Jan 2023, Jan Hubicka wrote: > > > We don't use same argumentation about other control flow statements. > > > The following: > > > > > > fn() > > > { > > > try { > > > i_read_no_global_memory (); > > > } catch (...) > > > { > > > reutrn 1; > > > } > > > return 0; > >

Re: [PATCH] middle-end/106075 - non-call EH and DSE

2023-01-17 Thread Jan Hubicka via Gcc-patches
> > We don't use same argumentation about other control flow statements. > > The following: > > > > fn() > > { > > try { > > i_read_no_global_memory (); > > } catch (...) > > { > > reutrn 1; > > } > > return 0; > > } > > > > should be detected as const. Marking throw pure would

Re: [PATCH] middle-end/106075 - non-call EH and DSE

2023-01-17 Thread Richard Biener via Gcc-patches
On Tue, 17 Jan 2023, Jan Hubicka wrote: > > On Tue, 17 Jan 2023, Jan Hubicka wrote: > > > > > > The following fixes a long-standing bug with DSE removing stores as > > > > dead even though they are live across non-call exceptional flow. > > > > This affects both GIMPLE and RTL DSE and the fix is

Re: [PATCH] middle-end/106075 - non-call EH and DSE

2023-01-17 Thread Jan Hubicka via Gcc-patches
> On Tue, 17 Jan 2023, Jan Hubicka wrote: > > > > The following fixes a long-standing bug with DSE removing stores as > > > dead even though they are live across non-call exceptional flow. > > > This affects both GIMPLE and RTL DSE and the fix is similar in > > > making externally throwing stateme

Re: [PATCH] middle-end/106075 - non-call EH and DSE

2023-01-17 Thread Richard Biener via Gcc-patches
On Tue, 17 Jan 2023, Jan Hubicka wrote: > > The following fixes a long-standing bug with DSE removing stores as > > dead even though they are live across non-call exceptional flow. > > This affects both GIMPLE and RTL DSE and the fix is similar in > > making externally throwing statements uses of

Re: [PATCH] middle-end/106075 - non-call EH and DSE

2023-01-17 Thread Jan Hubicka via Gcc-patches
> The following fixes a long-standing bug with DSE removing stores as > dead even though they are live across non-call exceptional flow. > This affects both GIMPLE and RTL DSE and the fix is similar in > making externally throwing statements uses of non-local stores. > Note this doesn't fix the GIM

[PATCH] middle-end/106075 - non-call EH and DSE

2023-01-17 Thread Richard Biener via Gcc-patches
The following fixes a long-standing bug with DSE removing stores as dead even though they are live across non-call exceptional flow. This affects both GIMPLE and RTL DSE and the fix is similar in making externally throwing statements uses of non-local stores. Note this doesn't fix the GIMPLE side w