Re: [PATCH] Fix PR88936

2019-04-15 Thread Richard Biener
On Fri, 12 Apr 2019, Richard Biener wrote: > On Fri, 12 Apr 2019, Richard Biener wrote: > > > On Fri, 12 Apr 2019, Michael Matz wrote: > > > > > Hi, > > > > > > On Fri, 12 Apr 2019, Richard Biener wrote: > > > > > > > > You miss PARM_DECLs and RESULT_DECLs, i.e. it's probably better to > > >

Re: [PATCH] Fix PR88936

2019-04-12 Thread Richard Biener
On Fri, 12 Apr 2019, Richard Biener wrote: > On Fri, 12 Apr 2019, Michael Matz wrote: > > > Hi, > > > > On Fri, 12 Apr 2019, Richard Biener wrote: > > > > > > You miss PARM_DECLs and RESULT_DECLs, i.e. it's probably better to > > > > factor > > > > out tree.c:auto_var_in_fn_p and place the ne

Re: [PATCH] Fix PR88936

2019-04-12 Thread Michael Matz
Hi, On Fri, 12 Apr 2019, Richard Biener wrote: > > > > You miss PARM_DECLs and RESULT_DECLs, i.e. it's probably better to > > > > factor out tree.c:auto_var_in_fn_p and place the new auto_var_p in > > > > tree.c as well. > > > > > > Hmm, I left the above unchanged from a different variant of t

Re: [PATCH] Fix PR88936

2019-04-12 Thread Richard Biener
On Fri, 12 Apr 2019, Michael Matz wrote: > Hi, > > On Fri, 12 Apr 2019, Richard Biener wrote: > > > > You miss PARM_DECLs and RESULT_DECLs, i.e. it's probably better to factor > > > out tree.c:auto_var_in_fn_p and place the new auto_var_p in tree.c as > > > well. > > > > Hmm, I left the above

Re: [PATCH] Fix PR88936

2019-04-12 Thread Michael Matz
Hi, On Fri, 12 Apr 2019, Richard Biener wrote: > > You miss PARM_DECLs and RESULT_DECLs, i.e. it's probably better to factor > > out tree.c:auto_var_in_fn_p and place the new auto_var_p in tree.c as > > well. > > Hmm, I left the above unchanged from a different variant of the patch > where for

Re: [PATCH] Fix PR88936

2019-04-12 Thread Richard Biener
On Fri, 12 Apr 2019, Michael Matz wrote: > Hi, > > On Fri, 12 Apr 2019, Richard Biener wrote: > > > @@ -332,6 +337,24 @@ struct obstack final_solutions_obstack; > > Indexed directly by variable info id. */ > > static vec varmap; > > > > +/* Return whether VAR is an automatic variable. *

Re: [PATCH] Fix PR88936

2019-04-12 Thread Michael Matz
Hi, On Fri, 12 Apr 2019, Richard Biener wrote: > @@ -332,6 +337,24 @@ struct obstack final_solutions_obstack; > Indexed directly by variable info id. */ > static vec varmap; > > +/* Return whether VAR is an automatic variable. */ > + > +static bool > +auto_var_p (const_tree var) > +{ > +

[PATCH] Fix PR88936

2019-04-12 Thread Richard Biener
The following fixes a IPA PTA miscompilation involving recursion which means two instances of the same local variables can become live. For both testcases we confuse one for the other and cause DSE to remove a store to the non-local one. The fix involves adding a "shadow" variable representing