From: spop Date: Sat, 13 Mar 2010 17:35:29 +0000 (+0000) Subject: Use ssizetype when long_long_integer_type_node is NULL. X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=e2222f16c04196ee0b2501f866ca60555569c431 Use ssizetype when long_long_integer_type_node is NULL. 2010-03-11 Sebastian Pop * graphite-clast-to-gimple.c (my_long_long): Defined. (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node. * graphite-sese-to-poly.c (my_long_long): Defined. (scop_ivs_can_be_represented): Use it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157438 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite index 75fe38f5ecf..abd98882293 100644 --- a/gcc/ChangeLog.graphite +++ b/gcc/ChangeLog.graphite @@ -1,3 +1,10 @@ +2010-03-11 Sebastian Pop + + * graphite-clast-to-gimple.c (my_long_long): Defined. + (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node. + * graphite-sese-to-poly.c (my_long_long): Defined. + (scop_ivs_can_be_represented): Use it. + 2010-03-10 Sebastian Pop * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params, diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c index 340c8fc4ecb..09c703baa3a 100644 --- a/gcc/graphite-clast-to-gimple.c +++ b/gcc/graphite-clast-to-gimple.c @@ -718,6 +718,13 @@ compute_bounds_for_level (poly_bb_p pbb, int level, mpz_t low, mpz_t up) /* Compute the type for the induction variable at LEVEL for the statement PBB, based on the transformed schedule of PBB. OLD_TYPE is the type of the old induction variable for that loop. */ +/* Java does not initialize long_long_integer_type_node. */ +#define my_long_long (long_long_integer_type_node ? long_long_integer_type_node : ssizetype) + +/* Given a CLOOG_IV, return the type that CLOOG_IV should have in GCC + land. The selected type is big enough to include the original loop + iteration variable, but signed to work with the subtractions CLooG + may have introduced. If such a type is not available, we fail. static tree compute_type_for_level_1 (poly_bb_p pbb, int level, tree old_type) @@ -775,17 +782,19 @@ clast_get_body_of_loop (struct clast_stmt *stmt) if (CLAST_STMT_IS_A (stmt, stmt_for)) return clast_get_body_of_loop (((struct clast_for *) stmt)->body); - if (CLAST_STMT_IS_A (stmt, stmt_guard)) - return clast_get_body_of_loop (((struct clast_guard *) stmt)->then); + if (type_precision < TYPE_PRECISION (my_long_long)) + return my_long_long; if (CLAST_STMT_IS_A (stmt, stmt_block)) return clast_get_body_of_loop (((struct clast_block *) stmt)->body); - gcc_unreachable (); + return my_long_long; } -/* Returns the type for the induction variable for the loop translated - from STMT_FOR. */ +#undef my_long_long + +/* Returns the induction variable for the loop that gets translated to + STMT. */ static tree gcc_type_for_iv_of_clast_loop (struct clast_for *stmt_for, int level,