Re: 'walk_stmt_load_store_addr_ops' for non-'gimple_assign_single_p (stmt)'

2021-03-18 Thread Thomas Schwinge
Hi! On 2021-03-17T08:46:16+0100, Richard Biener wrote: > On Wed, Mar 17, 2021 at 12:25 AM Thomas Schwinge > wrote: >> This is a prototype/"initial hack" for a very simple implementation of >> "Avoid unnecessary data transfer out of OMP >> construct". (... to be

Re: 'walk_stmt_load_store_addr_ops' for non-'gimple_assign_single_p (stmt)'

2021-03-17 Thread Michael Matz
Hello, On Wed, 17 Mar 2021, Richard Biener wrote: > > The walk_gimple functions are intended to be used on the SSA form of > > gimple (i.e. the one that it is in most of the time). > > Actually they are fine to use pre-SSA. Structurally, sure. > They just even pre-SSA distinguish between

Re: 'walk_stmt_load_store_addr_ops' for non-'gimple_assign_single_p (stmt)'

2021-03-17 Thread Richard Biener via Gcc
On Wed, Mar 17, 2021 at 12:25 AM Thomas Schwinge wrote: > > Hi! > > Thanks, Michael, and again Richard for your quick responses. > > On 2021-03-16T15:25:10+, Michael Matz wrote: > > On Tue, 16 Mar 2021, Thomas Schwinge wrote: > > > >> >>Indeed, given (Fortran) 'zzz = 1', we produce GIMPLE: >

Re: 'walk_stmt_load_store_addr_ops' for non-'gimple_assign_single_p (stmt)'

2021-03-17 Thread Richard Biener via Gcc
On Tue, Mar 16, 2021 at 4:25 PM Michael Matz wrote: > > Hello, > > On Tue, 16 Mar 2021, Thomas Schwinge wrote: > > > >>Indeed, given (Fortran) 'zzz = 1', we produce GIMPLE: > > >> > > >>gimple_assign > > >> > > >>..., and calling 'walk_stmt_load_store_addr_ops' on that, I see, as > >

Re: 'walk_stmt_load_store_addr_ops' for non-'gimple_assign_single_p (stmt)'

2021-03-16 Thread Thomas Schwinge
Hi! Thanks, Michael, and again Richard for your quick responses. On 2021-03-16T15:25:10+, Michael Matz wrote: > On Tue, 16 Mar 2021, Thomas Schwinge wrote: > >> >>Indeed, given (Fortran) 'zzz = 1', we produce GIMPLE: >> >> >> >>gimple_assign >> >> >> >>..., and calling

Re: 'walk_stmt_load_store_addr_ops' for non-'gimple_assign_single_p (stmt)'

2021-03-16 Thread Michael Matz
Hello, On Tue, 16 Mar 2021, Thomas Schwinge wrote: > >>Indeed, given (Fortran) 'zzz = 1', we produce GIMPLE: > >> > >>gimple_assign > >> > >>..., and calling 'walk_stmt_load_store_addr_ops' on that, I see, as > >>expected, the 'visit_store' callback invoked, with 'rhs' and 'arg': > >>''. >

Re: 'walk_stmt_load_store_addr_ops' for non-'gimple_assign_single_p (stmt)'

2021-03-16 Thread Richard Biener via Gcc
On Tue, Mar 16, 2021 at 4:02 PM Thomas Schwinge wrote: > > Hi! > > Richard, thanks for your answer. I'll need to look into this more; two > questions already: > > On 2021-03-15T20:17:17+0100, Richard Biener via Gcc wrote: > > On March 15, 2021 7:31:46 PM GMT+01:00, Thomas Schwinge > > wrote:

Re: 'walk_stmt_load_store_addr_ops' for non-'gimple_assign_single_p (stmt)'

2021-03-16 Thread Thomas Schwinge
Hi! Richard, thanks for your answer. I'll need to look into this more; two questions already: On 2021-03-15T20:17:17+0100, Richard Biener via Gcc wrote: > On March 15, 2021 7:31:46 PM GMT+01:00, Thomas Schwinge > wrote: >>First time I'm using this API -- so the error certainly may be on my

Re: 'walk_stmt_load_store_addr_ops' for non-'gimple_assign_single_p (stmt)'

2021-03-15 Thread Richard Biener via Gcc
On March 15, 2021 7:31:46 PM GMT+01:00, Thomas Schwinge wrote: >Hi! > >First time I'm using this API -- so the error certainly may be on my >side. ;-) > >What I'm doing, is a 'walk_gimple_seq', and in that one's >'callback_stmt', call 'walk_stmt_load_store_addr_ops', to collect >variable

'walk_stmt_load_store_addr_ops' for non-'gimple_assign_single_p (stmt)'

2021-03-15 Thread Thomas Schwinge
Hi! First time I'm using this API -- so the error certainly may be on my side. ;-) What I'm doing, is a 'walk_gimple_seq', and in that one's 'callback_stmt', call 'walk_stmt_load_store_addr_ops', to collect variable load/store/address-taken instances. This did seem quite straight-forward,