Hi Jeff, on 2020/2/11 上午10:14, Jiufu Guo wrote: > "Kewen.Lin" <li...@linux.ibm.com> writes: > >> Hi Segher, >> >> Thanks for your comments! Updated to v2 as below: >> >> 1) Removed unnecessary hook loop_unroll_adjust_tree. >> 2) Updated estimated_uf to estimated_unroll and some comments. >> >> gcc/ChangeLog >> >> 2020-02-10 Kewen Lin <li...@gcc.gnu.org> >> >> * cfgloop.h (struct loop): New field estimated_unroll. >> * tree-ssa-loop-manip.c (decide_uf_const_iter): New function. >> (decide_uf_runtime_iter): Likewise. >> (decide_uf_stupid): Likewise. >> (estimate_unroll_factor): Likewise. > In RTL unroller, target hooks are also involved when decide unroll > factor, so these decide_uf_xx functions may not same with final real > unroll factor in RTL. For example, at O2 by default, small loops will be > unrolled 2 times.
I didn't quite follow your comments, the patch already had targetm.loop_unroll_adjust in these decide_uf_xx functions, exactly the same as what we have in loop-unroll.c (for RTL unroll). Or anything I missed? BR, Kewen