summaryrefslogtreecommitdiff
path: root/gcc/graphite-clast-to-gimple.c
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2010-03-08 17:48:48 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2010-03-08 17:48:48 +0000
commitfc830e2d68d27d581f5a1a0b4c4da507254bffe0 (patch)
tree0aaa2fea58e336edc525781d7d2d849a805dbb60 /gcc/graphite-clast-to-gimple.c
parentbde82a01516fda05ef4d05a5253a71baed1ea170 (diff)
downloadgcc-fc830e2d68d27d581f5a1a0b4c4da507254bffe0.tar.gz
Cleanup.
2010-02-23 Sebastian Pop <sebastian.pop@amd.com> * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify and clean up the logic. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157279 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-clast-to-gimple.c')
-rw-r--r--gcc/graphite-clast-to-gimple.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c
index 424f5c68169..3e82075f2bc 100644
--- a/gcc/graphite-clast-to-gimple.c
+++ b/gcc/graphite-clast-to-gimple.c
@@ -997,34 +997,30 @@ static const char *
find_cloog_iv_in_expr (struct clast_expr *expr)
{
struct clast_term *term = (struct clast_term *) expr;
-
- if (expr->type == expr_term
- && !term->var)
- return NULL;
+ struct clast_reduction *red;
+ int i;
if (expr->type == expr_term)
return term->var;
- if (expr->type == expr_red)
- {
- int i;
- struct clast_reduction *red = (struct clast_reduction *) expr;
+ if (expr->type != expr_red)
+ return NULL;
- for (i = 0; i < red->n; i++)
- {
- const char *res = find_cloog_iv_in_expr ((red)->elts[i]);
+ red = (struct clast_reduction *) expr;
+ for (i = 0; i < red->n; i++)
+ {
+ const char *res = find_cloog_iv_in_expr (red->elts[i]);
- if (res)
- return res;
- }
+ if (res)
+ return res;
}
return NULL;
}
-/* Build for a clast_user_stmt USER_STMT a map between the CLAST
- induction variables and the corresponding GCC old induction
- variables. This information is stored on each GRAPHITE_BB. */
+/* Build for USER_STMT a map between the CLAST induction variables and
+ the corresponding GCC old induction variables. This information is
+ stored on each GRAPHITE_BB. */
static void
compute_cloog_iv_types_1 (poly_bb_p pbb, struct clast_user_stmt *user_stmt)