From 0d82a1c872bf48069028cf7753b171121991c95c Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Wed, 17 Aug 2011 12:00:35 +0000 Subject: tree.h (convert_to_ptrofftype_loc): New function. 2011-08-17 Richard Guenther * tree.h (convert_to_ptrofftype_loc): New function. (convert_to_ptrofftype): Define. * builtins.c (expand_builtin_bzero): Use size_type_node. (fold_builtin_bzero): Likewise. (std_gimplify_va_arg_expr): Build the BIT_AND_EXPR on the pointer. * c-typeck.c (build_unary_op): Use convert_to_ptrofftype_loc. * cgraphunit.c (thunk_adjust): Use fold_build_pointer_plus_loc. (cgraph_redirect_edge_call_stmt_to_callee): Use size_int. * expr.c (expand_expr_addr_expr_1): Use fold_build_pointer_plus. * fold-const.c (build_range_check): Negate using the original type. (fold_unary_loc): Use fold_build_pointer_plus_loc. * gimple-fold.c (gimple_adjust_this_by_delta): Use convert_to_ptrofftype. * gimplify.c (gimplify_self_mod_expr): Likewise. * graphite-clast-to-gimple.c (clast_to_gcc_expression): Likewise. (graphite_create_new_loop_guard): Likewise. * graphite-sese-to-poly.c (my_long_long): Remove. (scop_ivs_can_be_represented): Adjust. * tree-cfg.c (verify_gimple_assign_unary): Use ptrofftype_p. * tree-chrec.c (chrec_fold_plus_1): Use fold_build_pointer_plus. * tree-loop-distribution.c (build_size_arg_loc): Use size_type_node. (generate_memset_zero): Simplify. * tree-mudflap.c: Use fold_convert, not convert. * tree-predcom.c (suitable_reference_p): Expand DR_OFFSET in its own type. (determine_offset): Likewise for DR_STEP. (valid_initializer_p): Likewise. * tree-profile.c (prepare_instrumented_value): Convert the pointer to an integer type of same size. * tree-scalar-evolution.c (interpret_rhs_expr): Do not refer to sizetype without need. * tree-ssa-address.c (tree_mem_ref_addr): Likewise. * tree-ssa-loop-ivopts.c (find_bivs): Use convert_to_ptrofftype. * tree-ssa-loop-manip.c (create_iv): Likewise. (determine_exit_conditions): Adjust comment. * tree-ssa-pre.c (create_expression_by_pieces): Use convert_to_ptrofftype. * tree-ssa-structalias.c (get_constraint_for_1): Likewise. * varasm.c (array_size_for_constructor): Compute using double_ints. From-SVN: r177828 --- gcc/graphite-clast-to-gimple.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gcc/graphite-clast-to-gimple.c') diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c index 5f7a747..abf88778 100644 --- a/gcc/graphite-clast-to-gimple.c +++ b/gcc/graphite-clast-to-gimple.c @@ -346,7 +346,7 @@ clast_to_gcc_expression (tree type, struct clast_expr *e, ivs_params_p ip) tree name = clast_name_to_gcc (t->var, ip); if (POINTER_TYPE_P (TREE_TYPE (name)) != POINTER_TYPE_P (type)) - name = fold_convert (sizetype, name); + name = convert_to_ptrofftype (name); name = fold_convert (type, name); return name; @@ -357,7 +357,7 @@ clast_to_gcc_expression (tree type, struct clast_expr *e, ivs_params_p ip) tree name = clast_name_to_gcc (t->var, ip); if (POINTER_TYPE_P (TREE_TYPE (name)) != POINTER_TYPE_P (type)) - name = fold_convert (sizetype, name); + name = convert_to_ptrofftype (name); name = fold_convert (type, name); @@ -369,7 +369,7 @@ clast_to_gcc_expression (tree type, struct clast_expr *e, ivs_params_p ip) tree cst = gmp_cst_to_tree (type, t->val); if (POINTER_TYPE_P (TREE_TYPE (name)) != POINTER_TYPE_P (type)) - name = fold_convert (sizetype, name); + name = convert_to_ptrofftype (name); name = fold_convert (type, name); @@ -1064,7 +1064,7 @@ graphite_create_new_loop_guard (edge entry_edge, struct clast_for *stmt, else { tree one = (POINTER_TYPE_P (*type) - ? size_one_node + ? convert_to_ptrofftype (integer_one_node) : fold_convert (*type, integer_one_node)); /* Adding +1 and using LT_EXPR helps with loop latches that have a loop iteration count of "PARAMETER - 1". For PARAMETER == 0 this becomes -- cgit v1.1