diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2019-01-19 12:59:51 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2019-01-19 12:59:51 +0000 |
commit | e047844bd6af7b167eb06c570c2c79b800165bfb (patch) | |
tree | 5e8d6419785057f060ac589573af4aa2ace012dd /gcc/fortran/resolve.c | |
parent | b9e25708aa6fbe8fed641882bbdde4410d7c6d61 (diff) | |
download | gcc-e047844bd6af7b167eb06c570c2c79b800165bfb.zip gcc-e047844bd6af7b167eb06c570c2c79b800165bfb.tar.gz gcc-e047844bd6af7b167eb06c570c2c79b800165bfb.tar.bz2 |
Claw back some of the code size regression in 548.exchange2_r
This patch tries harder to detect cases in which the inner dimension
of an array access is invariant, such as:
x(i, :) = 100
It fixes some of the code size regression in 548.exchange2_r, with
size improving by 5% compared to before the patch. Of the two other
SPEC 2017 tests affected by loop versioning, 554.roms_r improved by a
trivial amount (0.3%) and 549.fotonik3d_r didn't change. All three
results are with -Ofast -flto.
2019-01-19 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* gimple-loop-versioning.cc (loop_versioning::dump_inner_likelihood):
New function, split out from...
(loop_versioning::analyze_stride): ...here.
(loop_versioning::find_per_loop_multiplication): Use gassign.
(loop_versioning::analyze_term_using_scevs): Return a success code.
(loop_versioning::analyze_arbitrary_term): New function.
(loop_versioning::analyze_address_fragment): Use
analyze_arbitrary_term if all else fails.
gcc/testsuite/
* gfortran.dg/loop_versioning_1.f90: Bump the number of identified
inner strides.
* gfortran.dg/loop_versioning_9.f90: New test.
* gfortran.dg/loop_versioning_10.f90: Likewise.
From-SVN: r268093
Diffstat (limited to 'gcc/fortran/resolve.c')
0 files changed, 0 insertions, 0 deletions