diff options
author | Sebastian Pop <sebastian.pop@amd.com> | 2010-09-30 21:16:18 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2010-09-30 21:16:18 +0000 |
commit | 2c2aceeb4d63c382806d1510c3691acb767bba6c (patch) | |
tree | ac1241dbc1cec04d497c6db07dc24df94325105e | |
parent | ae403f5abdb2691cfa6da23297486ce9a051e0b9 (diff) | |
download | gcc-2c2aceeb4d63c382806d1510c3691acb767bba6c.zip gcc-2c2aceeb4d63c382806d1510c3691acb767bba6c.tar.gz gcc-2c2aceeb4d63c382806d1510c3691acb767bba6c.tar.bz2 |
Avoid lang_hooks, call build_nonstandard_integer_type.
2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
* graphite-clast-to-gimple.c (max_signed_precision_type): Remove the call
to lang_hooks.types.type_for_size. Call build_nonstandard_integer_type.
From-SVN: r164771
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ChangeLog.graphite | 5 | ||||
-rw-r--r-- | gcc/graphite-clast-to-gimple.c | 12 |
3 files changed, 21 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b4a7367..20fa477 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-09-30 Sebastian Pop <sebastian.pop@amd.com> + + * graphite-clast-to-gimple.c (max_signed_precision_type): Remove the call + to lang_hooks.types.type_for_size. Call build_nonstandard_integer_type. + 2010-09-30 Riyadh Baghdadi <baghdadi.mr@gmail.com> * graphite-cloog-util.c (openscop_print_cloog_matrix): New. diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite index 50c1e13..dd37363 100644 --- a/gcc/ChangeLog.graphite +++ b/gcc/ChangeLog.graphite @@ -1,3 +1,8 @@ +2010-07-29 Sebastian Pop <sebastian.pop@amd.com> + + * graphite-clast-to-gimple.c (max_signed_precision_type): Remove the call + to lang_hooks.types.type_for_size. Call build_nonstandard_integer_type. + 2010-07-29 Riyadh Baghdadi <baghdadi.mr@gmail.com> * graphite-cloog-util.c (openscop_print_cloog_matrix): New. diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c index 3f26ad3..73bd971 100644 --- a/gcc/graphite-clast-to-gimple.c +++ b/gcc/graphite-clast-to-gimple.c @@ -201,19 +201,29 @@ max_signed_precision_type (tree type1, tree type2) int p2 = TYPE_PRECISION (type2); int precision; tree type; + enum machine_mode mode; if (p1 > p2) precision = TYPE_UNSIGNED (type1) ? p1 * 2 : p1; else precision = TYPE_UNSIGNED (type2) ? p2 * 2 : p2; - type = lang_hooks.types.type_for_size (precision, false); + if (precision > BITS_PER_WORD) + { + gloog_error = true; + return integer_type_node; + } + + mode = smallest_mode_for_size (precision, MODE_INT); + precision = GET_MODE_PRECISION (mode); + type = build_nonstandard_integer_type (precision, false); if (!type) { gloog_error = true; return integer_type_node; } + return type; } |