aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.h
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-08-24 16:50:14 +0000
committerGitHub <noreply@github.com>2022-08-24 16:50:14 +0000
commitd3cf195ab46d7effe806990aa6b7a409bf8e46df (patch)
treeeb33d22a749417ad62a3fc87c2dc8cfb3452632a /gcc/tree-data-ref.h
parent825a44b40ce6cfa76470e53d0746b1e64b99ee5b (diff)
parent2e77960b14527ff216fa188479de9142fbb9d34c (diff)
downloadgcc-d3cf195ab46d7effe806990aa6b7a409bf8e46df.zip
gcc-d3cf195ab46d7effe806990aa6b7a409bf8e46df.tar.gz
gcc-d3cf195ab46d7effe806990aa6b7a409bf8e46df.tar.bz2
Merge #1498
1498: Merge from GCC upstream r=philberty a=philberty Lets see if it builds. Co-authored-by: GCC Administrator <gccadmin@gcc.gnu.org> Co-authored-by: Dimitrije Milošević <dimitrije.milosevic@syrmia.com> Co-authored-by: Aldy Hernandez <aldyh@redhat.com> Co-authored-by: Jakub Jelinek <jakub@redhat.com> Co-authored-by: Martin Liska <mliska@suse.cz> Co-authored-by: Roger Sayle <roger@nextmovesoftware.com> Co-authored-by: Sam Feifer <sfeifer@redhat.com> Co-authored-by: Andrew Stubbs <ams@codesourcery.com> Co-authored-by: Jose E. Marchesi <jose.marchesi@oracle.com> Co-authored-by: H.J. Lu <hjl.tools@gmail.com> Co-authored-by: David Malcolm <dmalcolm@redhat.com> Co-authored-by: Richard Biener <rguenther@suse.de> Co-authored-by: Immad Mir <mirimmad@outlook.com>
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;