Re: [PATCH] Avoid setting TREE_ADDRESSABLE on stack vars during RTL expansion

2021-05-18 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Tue, 18 May 2021, Richard Biener wrote: > >> On Tue, 18 May 2021, Richard Sandiford wrote: >> >> > Richard Biener writes: >> > > @@ -6621,9 +6637,31 @@ pass_expand::execute (function *fun) >> > > (int) param_ssp_buffer_size); >> > > } >> > > >

Re: [PATCH] Avoid setting TREE_ADDRESSABLE on stack vars during RTL expansion

2021-05-18 Thread Richard Biener
er_nonconstant_array_refs_r - I'll fix that. I can also make > the above fool-proof by recoding the decls I marked addressable > in a vec and traverse that for unsetting - would that be prefered? So like this? Testing TREE_ADDRESSABLE where it formerly wasn't already testing use_re

Re: [PATCH] Avoid setting TREE_ADDRESSABLE on stack vars during RTL expansion

2021-05-18 Thread Richard Biener
On Tue, 18 May 2021, Richard Sandiford wrote: > Richard Biener writes: > > @@ -6621,9 +6637,31 @@ pass_expand::execute (function *fun) > > (int) param_ssp_buffer_size); > > } > > > > + /* Temporarily mark PARM_DECLs and RESULT_DECLs we need to expand to > > + memory addre

Re: [PATCH] Avoid setting TREE_ADDRESSABLE on stack vars during RTL expansion

2021-05-18 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > @@ -6621,9 +6637,31 @@ pass_expand::execute (function *fun) >(int) param_ssp_buffer_size); > } > > + /* Temporarily mark PARM_DECLs and RESULT_DECLs we need to expand to > + memory addressable so expand_function_start can emit the required > +

[PATCH] Avoid setting TREE_ADDRESSABLE on stack vars during RTL expansion

2021-05-18 Thread Richard Biener
This avoids setting TREE_ADDRESSABLE on variables we want to force to the stack. Instead track those in a temporary bitmap and force stack expansion that way, leaving TREE_ADDRESSABLE alone, not pessimizing future alias queries. Bootstrap and regtest running on x86_64-unknown-linux-gnu, comments