Re: PING^1 [PATCH v2] predict: Adjust optimize_function_for_size_p [PR105818]

2022-12-15 Thread Kewen.Lin via Gcc-patches
Hi Honza, Thanks for the comments. on 2022/12/14 21:22, Jan Hubicka wrote: >>> PR middle-end/105818 >>> >>> gcc/ChangeLog: >>> >>> * predict.cc (optimize_function_for_size_p): Further check >>> optimize_size of fun->decl when it is valid but no cgraph node. >>> >>> gcc/testsuite/Chang

Re: PING^1 [PATCH v2] predict: Adjust optimize_function_for_size_p [PR105818]

2022-12-14 Thread Martin Liška
On 12/14/22 14:22, Jan Hubicka via Gcc-patches wrote: >>> PR middle-end/105818 >>> >>> gcc/ChangeLog: >>> >>> * predict.cc (optimize_function_for_size_p): Further check >>> optimize_size of fun->decl when it is valid but no cgraph node. >>> >>> gcc/testsuite/ChangeLog: >>> >>> * gcc

Re: PING^1 [PATCH v2] predict: Adjust optimize_function_for_size_p [PR105818]

2022-12-14 Thread Jan Hubicka via Gcc-patches
> > PR middle-end/105818 > > > > gcc/ChangeLog: > > > > * predict.cc (optimize_function_for_size_p): Further check > > optimize_size of fun->decl when it is valid but no cgraph node. > > > > gcc/testsuite/ChangeLog: > > > > * gcc.target/powerpc/pr105818.c: New test. > > * gc

PING^1 [PATCH v2] predict: Adjust optimize_function_for_size_p [PR105818]

2022-12-14 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping: https://gcc.gnu.org/pipermail/gcc-patches/2022-November/607527.html BR, Kewen on 2022/11/30 16:30, Kewen.Lin via Gcc-patches wrote: > Hi, > > Function optimize_function_for_size_p returns OPTIMIZE_SIZE_NO > if fun->decl is not null but no cgraph node is available for it. > As P

[PATCH v2] predict: Adjust optimize_function_for_size_p [PR105818]

2022-11-30 Thread Kewen.Lin via Gcc-patches
Hi, Function optimize_function_for_size_p returns OPTIMIZE_SIZE_NO if fun->decl is not null but no cgraph node is available for it. As PR105818 shows, this could cause unexpected consequence. For the case in PR105818, when parsing bar decl in function foo, the cfun is the function structure for f