Re: [PATCH 2/2] rs6000: tune loop size for cunroll at O2

2020-05-20 Thread Segher Boessenkool
Hi! Yes, you can just use estimate_num_loop_insns afaics. On Wed, May 20, 2020 at 11:58:20AM +0800, Jiufu Guo wrote: >if (unroll_only_small_loops && optimize == 2) > { >if (maxiter >= 4 > - && !(TREE_CODE (niter) == INTEGER_CST && single_exit (loop))) > + && !(TREE_CO

Re: [PATCH 2/2] rs6000: tune loop size for cunroll at O2

2020-05-20 Thread Jiufu Guo via Gcc-patches
"Kewen.Lin" writes: > Hi Jeff, > > on 2020/5/20 上午11:58, Jiufu Guo via Gcc-patches wrote: >> Hi, >> >> This patch check the size of a loop to be unrolled/peeled completely, >> and set the limits to a number (24). This prevents large loop from >> being unrolled, then avoid binary size increasing

Re: [PATCH 2/2] rs6000: tune loop size for cunroll at O2

2020-05-19 Thread Kewen.Lin via Gcc-patches
Hi Jeff, on 2020/5/20 上午11:58, Jiufu Guo via Gcc-patches wrote: > Hi, > > This patch check the size of a loop to be unrolled/peeled completely, > and set the limits to a number (24). This prevents large loop from > being unrolled, then avoid binary size increasing, and this limit keeps > perform

Re: [PATCH 2/2] rs6000: tune loop size for cunroll at O2

2020-05-19 Thread Jiufu Guo via Gcc-patches
Jiufu Guo writes: > Hi, > > This patch check the size of a loop to be unrolled/peeled completely, > and set the limits to a number (24). This prevents large loop from > being unrolled, then avoid binary size increasing, and this limit keeps > performance. > > Bootstrap®test pass on powerpc64le,

[PATCH 2/2] rs6000: tune loop size for cunroll at O2

2020-05-19 Thread Jiufu Guo via Gcc-patches
Hi, This patch check the size of a loop to be unrolled/peeled completely, and set the limits to a number (24). This prevents large loop from being unrolled, then avoid binary size increasing, and this limit keeps performance. Bootstrap®test pass on powerpc64le, ok for trunk? Jiufu --- gcc/con