aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.h
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-08-23 14:29:23 +0100
committerPhilip Herron <philip.herron@embecosm.com>2022-08-23 14:31:03 +0100
commit57f0c9d6464c95807e836844f3013ed67948a16e (patch)
tree2a6b2ddf4fb364ebbc3699bcede6f40466f80aaa /gcc/tree-data-ref.h
parent8d1a6deb4e69e7dc162e741377674cf03459bcd9 (diff)
parentbaa3ffb19c54fa334ac2884f6acb5d31aa79ac32 (diff)
downloadgcc-57f0c9d6464c95807e836844f3013ed67948a16e.zip
gcc-57f0c9d6464c95807e836844f3013ed67948a16e.tar.gz
gcc-57f0c9d6464c95807e836844f3013ed67948a16e.tar.bz2
Merge remote-tracking branch 'gcc/master' into phil/gcc-upstream-merge
This merges GCC as of baa3ffb19c54fa334ac2884f6acb5d31aa79ac32 into gccrs
Diffstat (limited to 'gcc/tree-data-ref.h')
-rw-r--r--gcc/tree-data-ref.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/tree-data-ref.h b/gcc/tree-data-ref.h
index f0b8962..f643a95 100644
--- a/gcc/tree-data-ref.h
+++ b/gcc/tree-data-ref.h
@@ -600,10 +600,11 @@ same_data_refs_base_objects (data_reference_p a, data_reference_p b)
}
/* Return true when the data references A and B are accessing the same
- memory object with the same access functions. */
+ memory object with the same access functions. Optionally skip the
+ last OFFSET dimensions in the data reference. */
static inline bool
-same_data_refs (data_reference_p a, data_reference_p b)
+same_data_refs (data_reference_p a, data_reference_p b, int offset = 0)
{
unsigned int i;
@@ -614,7 +615,7 @@ same_data_refs (data_reference_p a, data_reference_p b)
if (!same_data_refs_base_objects (a, b))
return false;
- for (i = 0; i < DR_NUM_DIMENSIONS (a); i++)
+ for (i = offset; i < DR_NUM_DIMENSIONS (a); i++)
if (!eq_evolutions_p (DR_ACCESS_FN (a, i), DR_ACCESS_FN (b, i)))
return false;