]> git.ipfire.org Git - thirdparty/gcc.git/commit
rs6000: Refine RTL unroll hook for small loops
authorguojiufu <guojiufu@linux.ibm.com>
Wed, 15 Jul 2020 08:07:47 +0000 (16:07 +0800)
committerguojiufu <guojiufu@linux.ibm.com>
Wed, 15 Jul 2020 08:15:05 +0000 (16:15 +0800)
commit7a9fd18598e638b55c591624e753fb7a88abe1ab
tree53319423ecbfa03696271c0af503d35bbc71654c
parentfff15bad1ab571906c37b88380431768d917dcb0
rs6000: Refine RTL unroll hook for small loops

For very small loops (< 6 insns), it would be fine to unroll 4
times to run fast with less latency and better cache usage.  Like
below loops:
 while (i) a[--i] = NULL;   while (p < e)  *d++ = *p++;

With this patch enhances, we could see some performance improvement
for some workloads(e.g. SPEC2017).

2020-07-13  Jiufu Guo   <guojiufu@cn.ibm.com>

* config/rs6000/rs6000.c (rs6000_loop_unroll_adjust): Refine hook.
gcc/config/rs6000/rs6000.c