diff options
author | Jiufu Guo <guojiufu@linux.ibm.com> | 2019-10-28 05:23:24 +0000 |
---|---|---|
committer | Jiufu Guo <guojiufu@gcc.gnu.org> | 2019-10-28 05:23:24 +0000 |
commit | 6d099a76a0f6a040a3e678f2bce7fc69cc3257d8 (patch) | |
tree | 3f86230269de0eff1807c5bee4129696db86647f /gcc/fortran/trans-expr.c | |
parent | cf20d00ca1ae5a0da9b329896d7b51e55381bdd7 (diff) | |
download | gcc-6d099a76a0f6a040a3e678f2bce7fc69cc3257d8.zip gcc-6d099a76a0f6a040a3e678f2bce7fc69cc3257d8.tar.gz gcc-6d099a76a0f6a040a3e678f2bce7fc69cc3257d8.tar.bz2 |
rs6000: Enable limited unrolling at -O2
In PR88760, there are a few disscussion about improve or tune unroller for
targets. And we would agree to enable unroller for small loops at O2 first.
And we could see performance improvement(~10%) for below code:
```
subroutine foo (i, i1, block)
integer :: i, i1
integer :: block(9, 9, 9)
block(i:9,1,i1) = block(i:9,1,i1) - 10
end subroutine foo
```
This kind of code occurs a few times in exchange2 benchmark.
Similar C code:
```
for (i = 0; i < n; i++)
arr[i] = arr[i] - 10;
```
On powerpcle, for O2 , enable -funroll-loops and limit
PARAM_MAX_UNROLL_TIMES=2 and PARAM_MAX_UNROLLED_INSNS=20, we can see >2%
overall improvement for SPEC2017.
This patch is only for rs6000 in which we see visible performance improvement.
gcc/
2019-10-25 Jiufu Guo <guojiufu@linux.ibm.com>
PR tree-optimization/88760
* config/rs6000/rs6000-common.c (rs6000_option_optimization_table):
Enable -funroll-loops for -O2 and above.
* config/rs6000/rs6000.c (rs6000_option_override_internal): Set
PARAM_MAX_UNROLL_TIMES to 2 and PARAM_MAX_UNROLLED_INSNS to 20, and
do not turn on web and rngreg implicitly, if the unroller is not
explicitly enabled.
gcc.testsuite/
2019-10-25 Jiufu Guo <guojiufu@linux.ibm.com>
PR tree-optimization/88760
* gcc.target/powerpc/small-loop-unroll.c: New test.
* c-c++-common/tsan/thread_leak2.c: Update test.
* gcc.dg/pr59643.c: Update test.
* gcc.target/powerpc/loop_align.c: Update test.
* gcc.target/powerpc/ppc-fma-1.c: Update test.
* gcc.target/powerpc/ppc-fma-2.c: Update test.
* gcc.target/powerpc/ppc-fma-3.c: Update test.
* gcc.target/powerpc/ppc-fma-4.c: Update test.
* gcc.target/powerpc/pr78604.c: Update test.
From-SVN: r277501
Diffstat (limited to 'gcc/fortran/trans-expr.c')
0 files changed, 0 insertions, 0 deletions