diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-12-21 07:02:36 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-12-21 07:02:36 +0000 |
commit | d2fd6a04f958346c6311113f4244540ac28efef2 (patch) | |
tree | 320bf9bcc39e950dd35fcd65beec033182129dbf /gcc/tree-loop-distribution.c | |
parent | 0ddcd294d54bf049bb48fd7face88a1d8254877f (diff) | |
download | gcc-d2fd6a04f958346c6311113f4244540ac28efef2.zip gcc-d2fd6a04f958346c6311113f4244540ac28efef2.tar.gz gcc-d2fd6a04f958346c6311113f4244540ac28efef2.tar.bz2 |
poly_int: tree-ssa-loop-ivopts.c:iv_use
This patch makes ivopts handle polynomial address offsets
when recording potential IV uses.
2017-12-21 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
gcc/
* tree-ssa-loop-ivopts.h (strip_offset): Return the offset as
poly_uint64_pod rather than an unsigned HOST_WIDE_INT.
* tree-loop-distribution.c (classify_builtin_st): Update accordingly.
* tree-ssa-loop-ivopts.c (iv_use::addr_offset): Change from
an unsigned HOST_WIDE_INT to a poly_uint64_pod.
(group_compare_offset): Update accordingly.
(split_small_address_groups_p): Likewise.
(record_use): Take addr_offset as a poly_uint64 rather than
an unsigned HOST_WIDE_INT.
(strip_offset): Return the offset as a poly_uint64 rather than
an unsigned HOST_WIDE_INT.
(record_group_use, split_address_groups): Track polynomial offsets.
(add_iv_candidate_for_use): Likewise.
(addr_offset_valid_p): Take the offset as a poly_int64 rather
than a HOST_WIDE_INT.
(strip_offset_1): Return the offset as a poly_int64 rather than
a HOST_WIDE_INT.
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r255933
Diffstat (limited to 'gcc/tree-loop-distribution.c')
-rw-r--r-- | gcc/tree-loop-distribution.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c index 7439a1f..e195a46a 100644 --- a/gcc/tree-loop-distribution.c +++ b/gcc/tree-loop-distribution.c @@ -1513,10 +1513,16 @@ classify_builtin_st (loop_p loop, partition *partition, data_reference_p dr) if (!compute_access_range (loop, dr, &base, &size)) return; + poly_uint64 base_offset; + unsigned HOST_WIDE_INT const_base_offset; + tree base_base = strip_offset (base, &base_offset); + if (!base_offset.is_constant (&const_base_offset)) + return; + struct builtin_info *builtin; builtin = alloc_builtin (dr, NULL, base, NULL_TREE, size); - builtin->dst_base_base = strip_offset (builtin->dst_base, - &builtin->dst_base_offset); + builtin->dst_base_base = base_base; + builtin->dst_base_offset = const_base_offset; partition->builtin = builtin; partition->kind = PKIND_MEMSET; } |