summaryrefslogtreecommitdiff
path: root/gcc/graphite.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-11-03 20:17:38 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-11-03 20:17:38 +0000
commit2b2b3bd8d96c3193c8d9bc606ee1b5b3c9b47000 (patch)
tree81e969bd3646dc338eed81f44730a7c467aebe3b /gcc/graphite.c
parentd4f000ef87b18faf42726f23e17b15a8f14fe618 (diff)
downloadgcc-2b2b3bd8d96c3193c8d9bc606ee1b5b3c9b47000.tar.gz
2008-11-03 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r141555 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@141561 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite.c')
-rw-r--r--gcc/graphite.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/gcc/graphite.c b/gcc/graphite.c
index a14dd141e3e..90d82301202 100644
--- a/gcc/graphite.c
+++ b/gcc/graphite.c
@@ -864,6 +864,33 @@ loop_affine_expr (basic_block scop_entry, struct loop *loop, tree expr)
|| evolution_function_is_affine_multivariate_p (scev, n));
}
+/* Return false if the tree_code of the operand OP or any of its operands
+ is component_ref. */
+
+static bool
+exclude_component_ref (tree op)
+{
+ int i;
+ int len;
+
+ if (op)
+ {
+ if (TREE_CODE (op) == COMPONENT_REF)
+ return false;
+ else
+ {
+ len = TREE_OPERAND_LENGTH (op);
+ for (i = 0; i < len; ++i)
+ {
+ if (!exclude_component_ref (TREE_OPERAND (op, i)))
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
/* Return true if the operand OP is simple. */
static bool
@@ -879,7 +906,7 @@ is_simple_operand (loop_p loop, gimple stmt, tree op)
&& !stmt_simple_memref_p (loop, stmt, op)))
return false;
- return true;
+ return exclude_component_ref (op);
}
/* Return true only when STMT is simple enough for being handled by