Re: ipa: Fix wrong code with failed propagation to builtin_constant_p [PR93940]

2020-04-06 Thread Christophe Lyon via Gcc-patches
On Sat, 4 Apr 2020 at 11:47, Jan Hubicka wrote: > > Hi, > this patch fixes wrong code on a testcase where inline predicts > builtin_constant_p to be true but we fail to optimize its parameter to > constant > becuase FRE is not run and the value is passed by an aggregate. > > This patch makes the

Re: ipa: Fix wrong code with failed propagation to builtin_constant_p [PR93940]

2020-04-04 Thread Eric Botcazou
> sorry for that. Git is still not my friend. I managed to stash and > unstash multiple changes and mix them up. Git was clearly designed *not* to have friends if you ask me, so I cannot really blame you here. > I comitted the following fix. Thanks! -- Eric Botcazou

Re: ipa: Fix wrong code with failed propagation to builtin_constant_p [PR93940]

2020-04-04 Thread Jan Hubicka
> > The change 1) breaks bootstrap and 2) fails to update the ChangeLog files. Hi, sorry for that. Git is still not my friend. I managed to stash and unstash multiple changes and mix them up. I comitted the following fix. Honza diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0221945fe6c..75e3

Re: ipa: Fix wrong code with failed propagation to builtin_constant_p [PR93940]

2020-04-04 Thread H.J. Lu via Gcc-patches
On Sat, Apr 4, 2020 at 5:40 AM Eric Botcazou wrote: > > > gcc/ChangeLog: > > > > 2020-04-04 Jan Hubicka > > > > PR ipa/93940 > > * ipa-fnsummary.c (vrp_will_run_p): New function. > > (fre_will_run_p): New function. > > (evaluate_properties_for_edge): Use it. > > *

Re: ipa: Fix wrong code with failed propagation to builtin_constant_p [PR93940]

2020-04-04 Thread Eric Botcazou
> gcc/ChangeLog: > > 2020-04-04 Jan Hubicka > > PR ipa/93940 > * ipa-fnsummary.c (vrp_will_run_p): New function. > (fre_will_run_p): New function. > (evaluate_properties_for_edge): Use it. > * ipa-inline.c (can_inline_edge_by_limits_p): Do not inline > !opti