aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-08-17 12:00:35 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-08-17 12:00:35 +0000
commit0d82a1c872bf48069028cf7753b171121991c95c (patch)
treef6d96358126a89431fcc4b7b53d17b1c0b50c6f6 /gcc/cgraphunit.c
parentf846d4d940a93cbaba58b0cdb833c083f7b56df4 (diff)
downloadgcc-0d82a1c872bf48069028cf7753b171121991c95c.zip
gcc-0d82a1c872bf48069028cf7753b171121991c95c.tar.gz
gcc-0d82a1c872bf48069028cf7753b171121991c95c.tar.bz2
tree.h (convert_to_ptrofftype_loc): New function.
2011-08-17 Richard Guenther <rguenther@suse.de> * 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
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 93664f9..5e368f8 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1478,7 +1478,6 @@ thunk_adjust (gimple_stmt_iterator * bsi,
tree vtabletmp;
tree vtabletmp2;
tree vtabletmp3;
- tree offsettmp;
if (!vtable_entry_type)
{
@@ -1527,15 +1526,10 @@ thunk_adjust (gimple_stmt_iterator * bsi,
mark_symbols_for_renaming (stmt);
find_referenced_vars_in (stmt);
- /* Cast to sizetype. */
- offsettmp = create_tmp_var (sizetype, "offset");
- stmt = gimple_build_assign (offsettmp, fold_convert (sizetype, vtabletmp3));
- gsi_insert_after (bsi, stmt, GSI_NEW_STMT);
- mark_symbols_for_renaming (stmt);
- find_referenced_vars_in (stmt);
-
/* Adjust the `this' pointer. */
- ptr = fold_build_pointer_plus_loc (input_location, ptr, offsettmp);
+ ptr = fold_build_pointer_plus_loc (input_location, ptr, vtabletmp3);
+ ptr = force_gimple_operand_gsi (bsi, ptr, true, NULL_TREE, false,
+ GSI_CONTINUE_LINKING);
}
if (!this_adjusting
@@ -2417,8 +2411,7 @@ cgraph_redirect_edge_call_stmt_to_callee (struct cgraph_edge *e)
gsi = gsi_for_stmt (e->call_stmt);
gsi_computed = true;
gimple_adjust_this_by_delta (&gsi,
- build_int_cst (sizetype,
- e->indirect_info->thunk_delta));
+ size_int (e->indirect_info->thunk_delta));
e->indirect_info->thunk_delta = 0;
}