aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSebastian Pop <sebastian.pop@amd.com>2010-03-13 17:35:29 +0000
committerSebastian Pop <spop@gcc.gnu.org>2010-03-13 17:35:29 +0000
commit248081bc932cc9f1bba6ce780d447070f6e9cd6f (patch)
tree6698db35a015a43ce24f4e7d029bdc6971e13f9a /gcc
parentd97c90ae336fd2af978d82deb17e2ef6c50f2d71 (diff)
downloadgcc-248081bc932cc9f1bba6ce780d447070f6e9cd6f.zip
gcc-248081bc932cc9f1bba6ce780d447070f6e9cd6f.tar.gz
gcc-248081bc932cc9f1bba6ce780d447070f6e9cd6f.tar.bz2
Use ssizetype when long_long_integer_type_node is NULL.
2010-03-11 Sebastian Pop <sebastian.pop@amd.com> * 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. From-SVN: r157438
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog.graphite7
-rw-r--r--gcc/graphite-clast-to-gimple.c15
-rw-r--r--gcc/graphite-sese-to-poly.c6
3 files changed, 22 insertions, 6 deletions
diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index 75fe38f..abd9888 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,3 +1,10 @@
+2010-03-11 Sebastian Pop <sebastian.pop@amd.com>
+
+ * 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 <sebastian.pop@amd.com>
* 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 377ca8b..f99a158 100644
--- a/gcc/graphite-clast-to-gimple.c
+++ b/gcc/graphite-clast-to-gimple.c
@@ -547,6 +547,9 @@ clast_get_body_of_loop (struct clast_stmt *stmt)
gcc_unreachable ();
}
+/* 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
@@ -581,8 +584,8 @@ gcc_type_for_cloog_iv (const char *cloog_iv, gimple_bb_p gbb)
if (type_precision <= TYPE_PRECISION (long_integer_type_node))
return long_integer_type_node;
- if (type_precision <= TYPE_PRECISION (long_long_integer_type_node))
- return long_long_integer_type_node;
+ if (type_precision <= TYPE_PRECISION (my_long_long))
+ return my_long_long;
gcc_unreachable ();
}
@@ -593,17 +596,19 @@ gcc_type_for_cloog_iv (const char *cloog_iv, gimple_bb_p gbb)
if (type_precision < TYPE_PRECISION (long_integer_type_node))
return long_integer_type_node;
- if (type_precision < TYPE_PRECISION (long_long_integer_type_node))
- return long_long_integer_type_node;
+ if (type_precision < TYPE_PRECISION (my_long_long))
+ return my_long_long;
/* There is no signed type available, that is large enough to hold the
original value. */
gcc_unreachable ();
}
- return long_long_integer_type_node;
+ return my_long_long;
}
+#undef my_long_long
+
/* Returns the induction variable for the loop that gets translated to
STMT. */
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index 28ed07c..0f370a8 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -2910,6 +2910,9 @@ scop_canonicalize_loops (scop_p scop)
graphite_loop_normal_form (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)
+
/* Can all ivs be represented by a signed integer?
As CLooG might generate negative values in its expressions, signed loop ivs
are required in the backend. */
@@ -2934,13 +2937,14 @@ scop_ivs_can_be_represented (scop_p scop)
precision = TYPE_PRECISION (type);
if (TYPE_UNSIGNED (type)
- && precision >= TYPE_PRECISION (long_long_integer_type_node))
+ && precision >= TYPE_PRECISION (my_long_long))
return false;
}
return true;
}
+#undef my_long_long
/* Builds the polyhedral representation for a SESE region. */