Commit bd7742f8 by Sebastian Pop Committed by Sebastian Pop

graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify and clean up the logic.

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.

From-SVN: r157279
parent 733ff09d
2010-02-23 Sebastian Pop <sebastian.pop@amd.com> 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.
2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
* graphite-sese-to-poly.c (add_param_constraints): Enabled: remove * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
early return. early return.
......
...@@ -997,34 +997,30 @@ static const char * ...@@ -997,34 +997,30 @@ static const char *
find_cloog_iv_in_expr (struct clast_expr *expr) find_cloog_iv_in_expr (struct clast_expr *expr)
{ {
struct clast_term *term = (struct clast_term *) expr; struct clast_term *term = (struct clast_term *) expr;
struct clast_reduction *red;
if (expr->type == expr_term int i;
&& !term->var)
return NULL;
if (expr->type == expr_term) if (expr->type == expr_term)
return term->var; return term->var;
if (expr->type == expr_red) if (expr->type != expr_red)
{ return NULL;
int i;
struct clast_reduction *red = (struct clast_reduction *) expr;
red = (struct clast_reduction *) expr;
for (i = 0; i < red->n; i++) for (i = 0; i < red->n; i++)
{ {
const char *res = find_cloog_iv_in_expr ((red)->elts[i]); const char *res = find_cloog_iv_in_expr (red->elts[i]);
if (res) if (res)
return res; return res;
} }
}
return NULL; return NULL;
} }
/* Build for a clast_user_stmt USER_STMT a map between the CLAST /* Build for USER_STMT a map between the CLAST induction variables and
induction variables and the corresponding GCC old induction the corresponding GCC old induction variables. This information is
variables. This information is stored on each GRAPHITE_BB. */ stored on each GRAPHITE_BB. */
static void static void
compute_cloog_iv_types_1 (poly_bb_p pbb, struct clast_user_stmt *user_stmt) compute_cloog_iv_types_1 (poly_bb_p pbb, struct clast_user_stmt *user_stmt)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment