Commit b56b9fe3 by Roger Sayle Committed by Roger Sayle

function.c (gimplify_parameters): Call build_gimple_modify_stmt instead of…

function.c (gimplify_parameters): Call build_gimple_modify_stmt instead of calling build2 with a GIMPLE_MODIFY_STMT.


	* function.c (gimplify_parameters): Call build_gimple_modify_stmt
	instead of calling build2 with a GIMPLE_MODIFY_STMT.
	* gimple-low.c (lower_function_body, lower_builtin_setjmp):
	Likewise.
	* gimplify.c (build_stack_save_restore, gimplify_return_expr,
	gimplify_decl_expr,  gimplify_self_mod_expr, gimplify_cond_expr,
	gimplify_init_ctor_eval_range, gimple_push_cleanup,
	gimplify_omp_for, gimplify_omp_atomic_pipeline, 
	gimplify_omp_atomic_mutex, gimplify_expr, gimplify_one_sizepos,
	force_gimple_operand): Likewise.
	* ipa-cp.c (constant_val_insert): Likewise.
	* lambda-code.c (lbv_to_gcc_expression, lle_to_gcc_expression,
	lambda_loopnest_to_gcc_loopnest, replace_uses_equiv_to_x_with_y,
	perfect_nestify): Likewise.
	* langhooks.c (lhd_omp_assignment): Likewise.
	* omp-low.c (lower_rec_input_clauses, lower_reduction_clauses,
	lower_copyprivate_clauses, lower_send_clauses,
	lower_send_shared_vars, expand_parallel_call,
	expand_omp_for_generic, expand_omp_for_static_nochunk,
	expand_omp_for_static_chunk, expand_omp_sections,
	lower_omp_single_copy, lower_omp_for_lastprivate,
	lower_omp_parallel, init_tmp_var, save_tmp_var): Likewise.
	* value-prof.c (tree_divmod_fixed_value, tree_mod_pow2,
	tree_mod_subtract, tree_ic, tree_stringop_fixed_value):
	Likewise.

From-SVN: r122120
parent da08281c
2007-02-18 Roger Sayle <roger@eyesopen.com>
* function.c (gimplify_parameters): Call build_gimple_modify_stmt
instead of calling build2 with a GIMPLE_MODIFY_STMT.
* gimple-low.c (lower_function_body, lower_builtin_setjmp):
Likewise.
* gimplify.c (build_stack_save_restore, gimplify_return_expr,
gimplify_decl_expr, gimplify_self_mod_expr, gimplify_cond_expr,
gimplify_init_ctor_eval_range, gimple_push_cleanup,
gimplify_omp_for, gimplify_omp_atomic_pipeline,
gimplify_omp_atomic_mutex, gimplify_expr, gimplify_one_sizepos,
force_gimple_operand): Likewise.
* ipa-cp.c (constant_val_insert): Likewise.
* lambda-code.c (lbv_to_gcc_expression, lle_to_gcc_expression,
lambda_loopnest_to_gcc_loopnest, replace_uses_equiv_to_x_with_y,
perfect_nestify): Likewise.
* langhooks.c (lhd_omp_assignment): Likewise.
* omp-low.c (lower_rec_input_clauses, lower_reduction_clauses,
lower_copyprivate_clauses, lower_send_clauses,
lower_send_shared_vars, expand_parallel_call,
expand_omp_for_generic, expand_omp_for_static_nochunk,
expand_omp_for_static_chunk, expand_omp_sections,
lower_omp_single_copy, lower_omp_for_lastprivate,
lower_omp_parallel, init_tmp_var, save_tmp_var): Likewise.
* value-prof.c (tree_divmod_fixed_value, tree_mod_pow2,
tree_mod_subtract, tree_ic, tree_stringop_fixed_value):
Likewise.
2007-02-19 Kazu Hirata <kazu@codesourcery.com> 2007-02-19 Kazu Hirata <kazu@codesourcery.com>
* config/sh/divtab.c, config/sh/sh.c, config/sh/sh.h, * config/sh/divtab.c, config/sh/sh.c, config/sh/sh.h,
......
...@@ -3213,11 +3213,11 @@ gimplify_parameters (void) ...@@ -3213,11 +3213,11 @@ gimplify_parameters (void)
t = built_in_decls[BUILT_IN_ALLOCA]; t = built_in_decls[BUILT_IN_ALLOCA];
t = build_call_expr (t, 1, DECL_SIZE_UNIT (parm)); t = build_call_expr (t, 1, DECL_SIZE_UNIT (parm));
t = fold_convert (ptr_type, t); t = fold_convert (ptr_type, t);
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, addr, t); t = build_gimple_modify_stmt (addr, t);
gimplify_and_add (t, &stmts); gimplify_and_add (t, &stmts);
} }
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, local, parm); t = build_gimple_modify_stmt (local, parm);
gimplify_and_add (t, &stmts); gimplify_and_add (t, &stmts);
SET_DECL_VALUE_EXPR (parm, local); SET_DECL_VALUE_EXPR (parm, local);
......
/* Tree lowering pass. Lowers GIMPLE into unstructured form. /* Tree lowering pass. Lowers GIMPLE into unstructured form.
Copyright (C) 2003, 2005 Free Software Foundation, Inc. Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -137,7 +137,7 @@ lower_function_body (void) ...@@ -137,7 +137,7 @@ lower_function_body (void)
arg = build_addr (disp_label, current_function_decl); arg = build_addr (disp_label, current_function_decl);
t = implicit_built_in_decls[BUILT_IN_SETJMP_DISPATCHER]; t = implicit_built_in_decls[BUILT_IN_SETJMP_DISPATCHER];
t = build_call_expr (t, 1, arg); t = build_call_expr (t, 1, arg);
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, disp_var, t); x = build_gimple_modify_stmt (disp_var, t);
/* Build 'goto DISP_VAR;' and insert. */ /* Build 'goto DISP_VAR;' and insert. */
tsi_link_after (&i, x, TSI_CONTINUE_LINKING); tsi_link_after (&i, x, TSI_CONTINUE_LINKING);
...@@ -671,7 +671,8 @@ lower_builtin_setjmp (tree_stmt_iterator *tsi) ...@@ -671,7 +671,8 @@ lower_builtin_setjmp (tree_stmt_iterator *tsi)
/* Build 'DEST = 0' and insert. */ /* Build 'DEST = 0' and insert. */
if (dest) if (dest)
{ {
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, dest, integer_zero_node); t = build_gimple_modify_stmt (dest, fold_convert (TREE_TYPE (dest),
integer_zero_node));
SET_EXPR_LOCUS (t, EXPR_LOCUS (stmt)); SET_EXPR_LOCUS (t, EXPR_LOCUS (stmt));
tsi_link_before (tsi, t, TSI_SAME_STMT); tsi_link_before (tsi, t, TSI_SAME_STMT);
} }
...@@ -694,7 +695,8 @@ lower_builtin_setjmp (tree_stmt_iterator *tsi) ...@@ -694,7 +695,8 @@ lower_builtin_setjmp (tree_stmt_iterator *tsi)
/* Build 'DEST = 1' and insert. */ /* Build 'DEST = 1' and insert. */
if (dest) if (dest)
{ {
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, dest, integer_one_node); t = build_gimple_modify_stmt (dest, fold_convert (TREE_TYPE (dest),
integer_one_node));
SET_EXPR_LOCUS (t, EXPR_LOCUS (stmt)); SET_EXPR_LOCUS (t, EXPR_LOCUS (stmt));
tsi_link_before (tsi, t, TSI_SAME_STMT); tsi_link_before (tsi, t, TSI_SAME_STMT);
} }
......
...@@ -1043,7 +1043,7 @@ build_stack_save_restore (tree *save, tree *restore) ...@@ -1043,7 +1043,7 @@ build_stack_save_restore (tree *save, tree *restore)
build_call_expr (implicit_built_in_decls[BUILT_IN_STACK_SAVE], 0); build_call_expr (implicit_built_in_decls[BUILT_IN_STACK_SAVE], 0);
tmp_var = create_tmp_var (ptr_type_node, "saved_stack"); tmp_var = create_tmp_var (ptr_type_node, "saved_stack");
*save = build2 (GIMPLE_MODIFY_STMT, ptr_type_node, tmp_var, save_call); *save = build_gimple_modify_stmt (tmp_var, save_call);
*restore = *restore =
build_call_expr (implicit_built_in_decls[BUILT_IN_STACK_RESTORE], build_call_expr (implicit_built_in_decls[BUILT_IN_STACK_RESTORE],
1, tmp_var); 1, tmp_var);
...@@ -1197,8 +1197,7 @@ gimplify_return_expr (tree stmt, tree *pre_p) ...@@ -1197,8 +1197,7 @@ gimplify_return_expr (tree stmt, tree *pre_p)
if (result == result_decl) if (result == result_decl)
ret_expr = result; ret_expr = result;
else else
ret_expr = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (result), result_decl, ret_expr = build_gimple_modify_stmt (result_decl, result);
result);
TREE_OPERAND (stmt, 0) = ret_expr; TREE_OPERAND (stmt, 0) = ret_expr;
return GS_ALL_DONE; return GS_ALL_DONE;
...@@ -1252,7 +1251,7 @@ gimplify_decl_expr (tree *stmt_p) ...@@ -1252,7 +1251,7 @@ gimplify_decl_expr (tree *stmt_p)
t = built_in_decls[BUILT_IN_ALLOCA]; t = built_in_decls[BUILT_IN_ALLOCA];
t = build_call_expr (t, 1, DECL_SIZE_UNIT (decl)); t = build_call_expr (t, 1, DECL_SIZE_UNIT (decl));
t = fold_convert (ptr_type, t); t = fold_convert (ptr_type, t);
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, addr, t); t = build_gimple_modify_stmt (addr, t);
gimplify_and_add (t, stmt_p); gimplify_and_add (t, stmt_p);
...@@ -1951,7 +1950,7 @@ gimplify_self_mod_expr (tree *expr_p, tree *pre_p, tree *post_p, ...@@ -1951,7 +1950,7 @@ gimplify_self_mod_expr (tree *expr_p, tree *pre_p, tree *post_p,
} }
t1 = build2 (arith_code, TREE_TYPE (*expr_p), lhs, rhs); t1 = build2 (arith_code, TREE_TYPE (*expr_p), lhs, rhs);
t1 = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (lvalue), lvalue, t1); t1 = build_gimple_modify_stmt (lvalue, t1);
if (postfix) if (postfix)
{ {
...@@ -2467,14 +2466,12 @@ gimplify_cond_expr (tree *expr_p, tree *pre_p, fallback_t fallback) ...@@ -2467,14 +2466,12 @@ gimplify_cond_expr (tree *expr_p, tree *pre_p, fallback_t fallback)
if this branch is void; in C++ it can be, if it's a throw. */ if this branch is void; in C++ it can be, if it's a throw. */
if (TREE_TYPE (TREE_OPERAND (expr, 1)) != void_type_node) if (TREE_TYPE (TREE_OPERAND (expr, 1)) != void_type_node)
TREE_OPERAND (expr, 1) TREE_OPERAND (expr, 1)
= build2 (GIMPLE_MODIFY_STMT, void_type_node, tmp, = build_gimple_modify_stmt (tmp, TREE_OPERAND (expr, 1));
TREE_OPERAND (expr, 1));
/* Build the else clause, 't1 = b;'. */ /* Build the else clause, 't1 = b;'. */
if (TREE_TYPE (TREE_OPERAND (expr, 2)) != void_type_node) if (TREE_TYPE (TREE_OPERAND (expr, 2)) != void_type_node)
TREE_OPERAND (expr, 2) TREE_OPERAND (expr, 2)
= build2 (GIMPLE_MODIFY_STMT, void_type_node, tmp2, = build_gimple_modify_stmt (tmp2, TREE_OPERAND (expr, 2));
TREE_OPERAND (expr, 2));
TREE_TYPE (expr) = void_type_node; TREE_TYPE (expr) = void_type_node;
recalculate_side_effects (expr); recalculate_side_effects (expr);
...@@ -2732,7 +2729,7 @@ gimplify_init_ctor_eval_range (tree object, tree lower, tree upper, ...@@ -2732,7 +2729,7 @@ gimplify_init_ctor_eval_range (tree object, tree lower, tree upper,
tree *pre_p, bool cleared) tree *pre_p, bool cleared)
{ {
tree loop_entry_label, loop_exit_label; tree loop_entry_label, loop_exit_label;
tree var, var_type, cref; tree var, var_type, cref, tmp;
loop_entry_label = create_artificial_label (); loop_entry_label = create_artificial_label ();
loop_exit_label = create_artificial_label (); loop_exit_label = create_artificial_label ();
...@@ -2740,8 +2737,7 @@ gimplify_init_ctor_eval_range (tree object, tree lower, tree upper, ...@@ -2740,8 +2737,7 @@ gimplify_init_ctor_eval_range (tree object, tree lower, tree upper,
/* Create and initialize the index variable. */ /* Create and initialize the index variable. */
var_type = TREE_TYPE (upper); var_type = TREE_TYPE (upper);
var = create_tmp_var (var_type, NULL); var = create_tmp_var (var_type, NULL);
append_to_statement_list (build2 (GIMPLE_MODIFY_STMT, var_type, var, lower), append_to_statement_list (build_gimple_modify_stmt (var, lower), pre_p);
pre_p);
/* Add the loop entry label. */ /* Add the loop entry label. */
append_to_statement_list (build1 (LABEL_EXPR, append_to_statement_list (build1 (LABEL_EXPR,
...@@ -2762,9 +2758,7 @@ gimplify_init_ctor_eval_range (tree object, tree lower, tree upper, ...@@ -2762,9 +2758,7 @@ gimplify_init_ctor_eval_range (tree object, tree lower, tree upper,
gimplify_init_ctor_eval (cref, CONSTRUCTOR_ELTS (value), gimplify_init_ctor_eval (cref, CONSTRUCTOR_ELTS (value),
pre_p, cleared); pre_p, cleared);
else else
append_to_statement_list (build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (cref), append_to_statement_list (build_gimple_modify_stmt (cref, value), pre_p);
cref, value),
pre_p);
/* We exit the loop when the index var is equal to the upper bound. */ /* We exit the loop when the index var is equal to the upper bound. */
gimplify_and_add (build3 (COND_EXPR, void_type_node, gimplify_and_add (build3 (COND_EXPR, void_type_node,
...@@ -2777,11 +2771,9 @@ gimplify_init_ctor_eval_range (tree object, tree lower, tree upper, ...@@ -2777,11 +2771,9 @@ gimplify_init_ctor_eval_range (tree object, tree lower, tree upper,
pre_p); pre_p);
/* Otherwise, increment the index var... */ /* Otherwise, increment the index var... */
append_to_statement_list (build2 (GIMPLE_MODIFY_STMT, var_type, var, tmp = build2 (PLUS_EXPR, var_type, var,
build2 (PLUS_EXPR, var_type, var, fold_convert (var_type, integer_one_node));
fold_convert (var_type, append_to_statement_list (build_gimple_modify_stmt (var, tmp), pre_p);
integer_one_node))),
pre_p);
/* ...and jump back to the loop entry. */ /* ...and jump back to the loop entry. */
append_to_statement_list (build1 (GOTO_EXPR, append_to_statement_list (build1 (GOTO_EXPR,
...@@ -4240,10 +4232,8 @@ gimple_push_cleanup (tree var, tree cleanup, bool eh_only, tree *pre_p) ...@@ -4240,10 +4232,8 @@ gimple_push_cleanup (tree var, tree cleanup, bool eh_only, tree *pre_p)
*/ */
tree flag = create_tmp_var (boolean_type_node, "cleanup"); tree flag = create_tmp_var (boolean_type_node, "cleanup");
tree ffalse = build2 (GIMPLE_MODIFY_STMT, void_type_node, flag, tree ffalse = build_gimple_modify_stmt (flag, boolean_false_node);
boolean_false_node); tree ftrue = build_gimple_modify_stmt (flag, boolean_true_node);
tree ftrue = build2 (GIMPLE_MODIFY_STMT, void_type_node, flag,
boolean_true_node);
cleanup = build3 (COND_EXPR, void_type_node, flag, cleanup, NULL); cleanup = build3 (COND_EXPR, void_type_node, flag, cleanup, NULL);
wce = build1 (WITH_CLEANUP_EXPR, void_type_node, cleanup); wce = build1 (WITH_CLEANUP_EXPR, void_type_node, cleanup);
append_to_statement_list (ffalse, &gimplify_ctxp->conditional_cleanups); append_to_statement_list (ffalse, &gimplify_ctxp->conditional_cleanups);
...@@ -5008,14 +4998,16 @@ gimplify_omp_for (tree *expr_p, tree *pre_p) ...@@ -5008,14 +4998,16 @@ gimplify_omp_for (tree *expr_p, tree *pre_p)
case PREINCREMENT_EXPR: case PREINCREMENT_EXPR:
case POSTINCREMENT_EXPR: case POSTINCREMENT_EXPR:
t = build_int_cst (TREE_TYPE (decl), 1); t = build_int_cst (TREE_TYPE (decl), 1);
goto build_modify; t = build2 (PLUS_EXPR, TREE_TYPE (decl), decl, t);
t = build_gimple_modify_stmt (decl, t);
OMP_FOR_INCR (for_stmt) = t;
break;
case PREDECREMENT_EXPR: case PREDECREMENT_EXPR:
case POSTDECREMENT_EXPR: case POSTDECREMENT_EXPR:
t = build_int_cst (TREE_TYPE (decl), -1); t = build_int_cst (TREE_TYPE (decl), -1);
goto build_modify;
build_modify:
t = build2 (PLUS_EXPR, TREE_TYPE (decl), decl, t); t = build2 (PLUS_EXPR, TREE_TYPE (decl), decl, t);
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, decl, t); t = build_gimple_modify_stmt (decl, t);
OMP_FOR_INCR (for_stmt) = t; OMP_FOR_INCR (for_stmt) = t;
break; break;
...@@ -5229,7 +5221,7 @@ gimplify_omp_atomic_pipeline (tree *expr_p, tree *pre_p, tree addr, ...@@ -5229,7 +5221,7 @@ gimplify_omp_atomic_pipeline (tree *expr_p, tree *pre_p, tree addr,
return GS_ERROR; return GS_ERROR;
x = build_fold_indirect_ref (addr); x = build_fold_indirect_ref (addr);
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, oldval, x); x = build_gimple_modify_stmt (oldval, x);
gimplify_and_add (x, pre_p); gimplify_and_add (x, pre_p);
/* For floating-point values, we'll need to view-convert them to integers /* For floating-point values, we'll need to view-convert them to integers
...@@ -5247,7 +5239,7 @@ gimplify_omp_atomic_pipeline (tree *expr_p, tree *pre_p, tree addr, ...@@ -5247,7 +5239,7 @@ gimplify_omp_atomic_pipeline (tree *expr_p, tree *pre_p, tree addr,
newival = create_tmp_var (itype, NULL); newival = create_tmp_var (itype, NULL);
x = build1 (VIEW_CONVERT_EXPR, itype, oldval); x = build1 (VIEW_CONVERT_EXPR, itype, oldval);
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, oldival, x); x = build_gimple_modify_stmt (oldival, x);
gimplify_and_add (x, pre_p); gimplify_and_add (x, pre_p);
iaddr = fold_convert (build_pointer_type (itype), addr); iaddr = fold_convert (build_pointer_type (itype), addr);
} }
...@@ -5258,32 +5250,31 @@ gimplify_omp_atomic_pipeline (tree *expr_p, tree *pre_p, tree addr, ...@@ -5258,32 +5250,31 @@ gimplify_omp_atomic_pipeline (tree *expr_p, tree *pre_p, tree addr,
x = build1 (LABEL_EXPR, void_type_node, label); x = build1 (LABEL_EXPR, void_type_node, label);
gimplify_and_add (x, pre_p); gimplify_and_add (x, pre_p);
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, newval, rhs); x = build_gimple_modify_stmt (newval, rhs);
gimplify_and_add (x, pre_p); gimplify_and_add (x, pre_p);
if (newval != newival) if (newval != newival)
{ {
x = build1 (VIEW_CONVERT_EXPR, itype, newval); x = build1 (VIEW_CONVERT_EXPR, itype, newval);
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, newival, x); x = build_gimple_modify_stmt (newival, x);
gimplify_and_add (x, pre_p); gimplify_and_add (x, pre_p);
} }
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, oldival2, x = build_gimple_modify_stmt (oldival2, fold_convert (itype, oldival));
fold_convert (itype, oldival));
gimplify_and_add (x, pre_p); gimplify_and_add (x, pre_p);
x = build_call_expr (cmpxchg, 3, iaddr, fold_convert (itype, oldival), x = build_call_expr (cmpxchg, 3, iaddr, fold_convert (itype, oldival),
fold_convert (itype, newival)); fold_convert (itype, newival));
if (oldval == oldival) if (oldval == oldival)
x = fold_convert (type, x); x = fold_convert (type, x);
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, oldival, x); x = build_gimple_modify_stmt (oldival, x);
gimplify_and_add (x, pre_p); gimplify_and_add (x, pre_p);
/* For floating point, be prepared for the loop backedge. */ /* For floating point, be prepared for the loop backedge. */
if (oldval != oldival) if (oldval != oldival)
{ {
x = build1 (VIEW_CONVERT_EXPR, type, oldival); x = build1 (VIEW_CONVERT_EXPR, type, oldival);
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, oldval, x); x = build_gimple_modify_stmt (oldval, x);
gimplify_and_add (x, pre_p); gimplify_and_add (x, pre_p);
} }
...@@ -5321,7 +5312,7 @@ gimplify_omp_atomic_mutex (tree *expr_p, tree *pre_p, tree addr, tree rhs) ...@@ -5321,7 +5312,7 @@ gimplify_omp_atomic_mutex (tree *expr_p, tree *pre_p, tree addr, tree rhs)
gimplify_and_add (t, pre_p); gimplify_and_add (t, pre_p);
t = build_fold_indirect_ref (addr); t = build_fold_indirect_ref (addr);
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, t, rhs); t = build_gimple_modify_stmt (t, rhs);
gimplify_and_add (t, pre_p); gimplify_and_add (t, pre_p);
t = built_in_decls[BUILT_IN_GOMP_ATOMIC_END]; t = built_in_decls[BUILT_IN_GOMP_ATOMIC_END];
...@@ -5989,7 +5980,7 @@ gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p, ...@@ -5989,7 +5980,7 @@ gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p,
given a TREE_ADDRESSABLE type. */ given a TREE_ADDRESSABLE type. */
tree tmp = create_tmp_var_raw (type, "vol"); tree tmp = create_tmp_var_raw (type, "vol");
gimple_add_tmp_var (tmp); gimple_add_tmp_var (tmp);
*expr_p = build2 (GIMPLE_MODIFY_STMT, type, tmp, *expr_p); *expr_p = build_gimple_modify_stmt (tmp, *expr_p);
} }
else else
/* We can't do anything useful with a volatile reference to /* We can't do anything useful with a volatile reference to
...@@ -6221,7 +6212,7 @@ gimplify_one_sizepos (tree *expr_p, tree *stmt_p) ...@@ -6221,7 +6212,7 @@ gimplify_one_sizepos (tree *expr_p, tree *stmt_p)
*expr_p = create_tmp_var (type, NULL); *expr_p = create_tmp_var (type, NULL);
tmp = build1 (NOP_EXPR, type, expr); tmp = build1 (NOP_EXPR, type, expr);
tmp = build2 (GIMPLE_MODIFY_STMT, type, *expr_p, tmp); tmp = build_gimple_modify_stmt (*expr_p, tmp);
if (EXPR_HAS_LOCATION (expr)) if (EXPR_HAS_LOCATION (expr))
SET_EXPR_LOCUS (tmp, EXPR_LOCUS (expr)); SET_EXPR_LOCUS (tmp, EXPR_LOCUS (expr));
else else
...@@ -6474,7 +6465,7 @@ force_gimple_operand (tree expr, tree *stmts, bool simple, tree var) ...@@ -6474,7 +6465,7 @@ force_gimple_operand (tree expr, tree *stmts, bool simple, tree var)
gimplify_ctxp->into_ssa = gimple_in_ssa_p (cfun); gimplify_ctxp->into_ssa = gimple_in_ssa_p (cfun);
if (var) if (var)
expr = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (var), var, expr); expr = build_gimple_modify_stmt (var, expr);
ret = gimplify_expr (&expr, stmts, NULL, ret = gimplify_expr (&expr, stmts, NULL,
gimple_test_f, fb_rvalue); gimple_test_f, fb_rvalue);
......
/* Interprocedural constant propagation /* Interprocedural constant propagation
Copyright (C) 2005 Free Software Foundation, Inc. Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
Contributed by Razya Ladelsky <RAZYA@il.ibm.com> Contributed by Razya Ladelsky <RAZYA@il.ibm.com>
This file is part of GCC. This file is part of GCC.
...@@ -445,7 +445,7 @@ constant_val_insert (tree parm1, tree val) ...@@ -445,7 +445,7 @@ constant_val_insert (tree parm1, tree val)
tree init_stmt = NULL; tree init_stmt = NULL;
edge e_step; edge e_step;
init_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, parm1, val); init_stmt = build_gimple_modify_stmt (parm1, val);
if (init_stmt) if (init_stmt)
{ {
......
/* Loop transformation code generation /* Loop transformation code generation
Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Contributed by Daniel Berlin <dberlin@dberlin.org> Contributed by Daniel Berlin <dberlin@dberlin.org>
This file is part of GCC. This file is part of GCC.
...@@ -1540,8 +1540,8 @@ lbv_to_gcc_expression (lambda_body_vector lbv, ...@@ -1540,8 +1540,8 @@ lbv_to_gcc_expression (lambda_body_vector lbv,
add_referenced_var (resvar); add_referenced_var (resvar);
/* Start at 0. */ /* Start at 0. */
stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, resvar, stmt = build_gimple_modify_stmt (resvar,
integer_zero_node); fold_convert (type, integer_zero_node));
name = make_ssa_name (resvar, stmt); name = make_ssa_name (resvar, stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = name; GIMPLE_STMT_OPERAND (stmt, 0) = name;
tsi = tsi_last (stmts); tsi = tsi_last (stmts);
...@@ -1556,8 +1556,9 @@ lbv_to_gcc_expression (lambda_body_vector lbv, ...@@ -1556,8 +1556,9 @@ lbv_to_gcc_expression (lambda_body_vector lbv,
/* newname = coefficient * induction_variable */ /* newname = coefficient * induction_variable */
coeffmult = build_int_cst (type, LBV_COEFFICIENTS (lbv)[i]); coeffmult = build_int_cst (type, LBV_COEFFICIENTS (lbv)[i]);
stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, resvar, stmt = build_gimple_modify_stmt (resvar,
fold_build2 (MULT_EXPR, type, iv, coeffmult)); fold_build2 (MULT_EXPR, type,
iv, coeffmult));
newname = make_ssa_name (resvar, stmt); newname = make_ssa_name (resvar, stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = newname; GIMPLE_STMT_OPERAND (stmt, 0) = newname;
...@@ -1566,8 +1567,9 @@ lbv_to_gcc_expression (lambda_body_vector lbv, ...@@ -1566,8 +1567,9 @@ lbv_to_gcc_expression (lambda_body_vector lbv,
tsi_link_after (&tsi, stmt, TSI_CONTINUE_LINKING); tsi_link_after (&tsi, stmt, TSI_CONTINUE_LINKING);
/* name = name + newname */ /* name = name + newname */
stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, resvar, stmt = build_gimple_modify_stmt (resvar,
build2 (PLUS_EXPR, type, name, newname)); build2 (PLUS_EXPR, type,
name, newname));
name = make_ssa_name (resvar, stmt); name = make_ssa_name (resvar, stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = name; GIMPLE_STMT_OPERAND (stmt, 0) = name;
fold_stmt (&stmt); fold_stmt (&stmt);
...@@ -1581,8 +1583,9 @@ lbv_to_gcc_expression (lambda_body_vector lbv, ...@@ -1581,8 +1583,9 @@ lbv_to_gcc_expression (lambda_body_vector lbv,
if (LBV_DENOMINATOR (lbv) != 1) if (LBV_DENOMINATOR (lbv) != 1)
{ {
tree denominator = build_int_cst (type, LBV_DENOMINATOR (lbv)); tree denominator = build_int_cst (type, LBV_DENOMINATOR (lbv));
stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, resvar, stmt = build_gimple_modify_stmt (resvar,
build2 (CEIL_DIV_EXPR, type, name, denominator)); build2 (CEIL_DIV_EXPR, type,
name, denominator));
name = make_ssa_name (resvar, stmt); name = make_ssa_name (resvar, stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = name; GIMPLE_STMT_OPERAND (stmt, 0) = name;
fold_stmt (&stmt); fold_stmt (&stmt);
...@@ -1632,8 +1635,8 @@ lle_to_gcc_expression (lambda_linear_expression lle, ...@@ -1632,8 +1635,8 @@ lle_to_gcc_expression (lambda_linear_expression lle,
for (; lle != NULL; lle = LLE_NEXT (lle)) for (; lle != NULL; lle = LLE_NEXT (lle))
{ {
/* Start at name = 0. */ /* Start at name = 0. */
stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, resvar, stmt = build_gimple_modify_stmt (resvar,
integer_zero_node); fold_convert (type, integer_zero_node));
name = make_ssa_name (resvar, stmt); name = make_ssa_name (resvar, stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = name; GIMPLE_STMT_OPERAND (stmt, 0) = name;
fold_stmt (&stmt); fold_stmt (&stmt);
...@@ -1664,7 +1667,7 @@ lle_to_gcc_expression (lambda_linear_expression lle, ...@@ -1664,7 +1667,7 @@ lle_to_gcc_expression (lambda_linear_expression lle,
} }
/* newname = mult */ /* newname = mult */
stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, resvar, mult); stmt = build_gimple_modify_stmt (resvar, mult);
newname = make_ssa_name (resvar, stmt); newname = make_ssa_name (resvar, stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = newname; GIMPLE_STMT_OPERAND (stmt, 0) = newname;
fold_stmt (&stmt); fold_stmt (&stmt);
...@@ -1672,8 +1675,9 @@ lle_to_gcc_expression (lambda_linear_expression lle, ...@@ -1672,8 +1675,9 @@ lle_to_gcc_expression (lambda_linear_expression lle,
tsi_link_after (&tsi, stmt, TSI_CONTINUE_LINKING); tsi_link_after (&tsi, stmt, TSI_CONTINUE_LINKING);
/* name = name + newname */ /* name = name + newname */
stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, resvar, stmt = build_gimple_modify_stmt (resvar,
build2 (PLUS_EXPR, type, name, newname)); build2 (PLUS_EXPR, type,
name, newname));
name = make_ssa_name (resvar, stmt); name = make_ssa_name (resvar, stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = name; GIMPLE_STMT_OPERAND (stmt, 0) = name;
fold_stmt (&stmt); fold_stmt (&stmt);
...@@ -1705,7 +1709,7 @@ lle_to_gcc_expression (lambda_linear_expression lle, ...@@ -1705,7 +1709,7 @@ lle_to_gcc_expression (lambda_linear_expression lle,
} }
/* newname = mult */ /* newname = mult */
stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, resvar, mult); stmt = build_gimple_modify_stmt (resvar, mult);
newname = make_ssa_name (resvar, stmt); newname = make_ssa_name (resvar, stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = newname; GIMPLE_STMT_OPERAND (stmt, 0) = newname;
fold_stmt (&stmt); fold_stmt (&stmt);
...@@ -1713,8 +1717,9 @@ lle_to_gcc_expression (lambda_linear_expression lle, ...@@ -1713,8 +1717,9 @@ lle_to_gcc_expression (lambda_linear_expression lle,
tsi_link_after (&tsi, stmt, TSI_CONTINUE_LINKING); tsi_link_after (&tsi, stmt, TSI_CONTINUE_LINKING);
/* name = name + newname */ /* name = name + newname */
stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, resvar, stmt = build_gimple_modify_stmt (resvar,
build2 (PLUS_EXPR, type, name, newname)); build2 (PLUS_EXPR, type,
name, newname));
name = make_ssa_name (resvar, stmt); name = make_ssa_name (resvar, stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = name; GIMPLE_STMT_OPERAND (stmt, 0) = name;
fold_stmt (&stmt); fold_stmt (&stmt);
...@@ -1727,9 +1732,9 @@ lle_to_gcc_expression (lambda_linear_expression lle, ...@@ -1727,9 +1732,9 @@ lle_to_gcc_expression (lambda_linear_expression lle,
name = name + constant. */ name = name + constant. */
if (LLE_CONSTANT (lle) != 0) if (LLE_CONSTANT (lle) != 0)
{ {
stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, resvar, tree incr = build_int_cst (type, LLE_CONSTANT (lle));
build2 (PLUS_EXPR, type, name, stmt = build_gimple_modify_stmt (resvar, build2 (PLUS_EXPR, type,
build_int_cst (type, LLE_CONSTANT (lle)))); name, incr));
name = make_ssa_name (resvar, stmt); name = make_ssa_name (resvar, stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = name; GIMPLE_STMT_OPERAND (stmt, 0) = name;
fold_stmt (&stmt); fold_stmt (&stmt);
...@@ -1741,9 +1746,9 @@ lle_to_gcc_expression (lambda_linear_expression lle, ...@@ -1741,9 +1746,9 @@ lle_to_gcc_expression (lambda_linear_expression lle,
name = name + linear offset. */ name = name + linear offset. */
if (LLE_CONSTANT (offset) != 0) if (LLE_CONSTANT (offset) != 0)
{ {
stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, resvar, tree incr = build_int_cst (type, LLE_CONSTANT (offset));
build2 (PLUS_EXPR, type, name, stmt = build_gimple_modify_stmt (resvar, build2 (PLUS_EXPR, type,
build_int_cst (type, LLE_CONSTANT (offset)))); name, incr));
name = make_ssa_name (resvar, stmt); name = make_ssa_name (resvar, stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = name; GIMPLE_STMT_OPERAND (stmt, 0) = name;
fold_stmt (&stmt); fold_stmt (&stmt);
...@@ -1757,7 +1762,7 @@ lle_to_gcc_expression (lambda_linear_expression lle, ...@@ -1757,7 +1762,7 @@ lle_to_gcc_expression (lambda_linear_expression lle,
stmt = build_int_cst (type, LLE_DENOMINATOR (lle)); stmt = build_int_cst (type, LLE_DENOMINATOR (lle));
stmt = build2 (wrap == MAX_EXPR ? CEIL_DIV_EXPR : FLOOR_DIV_EXPR, stmt = build2 (wrap == MAX_EXPR ? CEIL_DIV_EXPR : FLOOR_DIV_EXPR,
type, name, stmt); type, name, stmt);
stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, resvar, stmt); stmt = build_gimple_modify_stmt (resvar, stmt);
/* name = {ceil, floor}(name/denominator) */ /* name = {ceil, floor}(name/denominator) */
name = make_ssa_name (resvar, stmt); name = make_ssa_name (resvar, stmt);
...@@ -1777,8 +1782,7 @@ lle_to_gcc_expression (lambda_linear_expression lle, ...@@ -1777,8 +1782,7 @@ lle_to_gcc_expression (lambda_linear_expression lle,
{ {
tree op1 = VEC_index (tree, results, 0); tree op1 = VEC_index (tree, results, 0);
tree op2 = VEC_index (tree, results, 1); tree op2 = VEC_index (tree, results, 1);
stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, resvar, stmt = build_gimple_modify_stmt (resvar, build2 (wrap, type, op1, op2));
build2 (wrap, type, op1, op2));
name = make_ssa_name (resvar, stmt); name = make_ssa_name (resvar, stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = name; GIMPLE_STMT_OPERAND (stmt, 0) = name;
tsi = tsi_last (stmts); tsi = tsi_last (stmts);
...@@ -1895,8 +1899,7 @@ lambda_loopnest_to_gcc_loopnest (struct loop *old_loopnest, ...@@ -1895,8 +1899,7 @@ lambda_loopnest_to_gcc_loopnest (struct loop *old_loopnest,
test, and let redundancy elimination sort it out. */ test, and let redundancy elimination sort it out. */
inc_stmt = build2 (PLUS_EXPR, type, inc_stmt = build2 (PLUS_EXPR, type,
ivvar, build_int_cst (type, LL_STEP (newloop))); ivvar, build_int_cst (type, LL_STEP (newloop)));
inc_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, inc_stmt = build_gimple_modify_stmt (SSA_NAME_VAR (ivvar), inc_stmt);
SSA_NAME_VAR (ivvar), inc_stmt);
ivvarinced = make_ssa_name (SSA_NAME_VAR (ivvar), inc_stmt); ivvarinced = make_ssa_name (SSA_NAME_VAR (ivvar), inc_stmt);
GIMPLE_STMT_OPERAND (inc_stmt, 0) = ivvarinced; GIMPLE_STMT_OPERAND (inc_stmt, 0) = ivvarinced;
bsi = bsi_for_stmt (exitcond); bsi = bsi_for_stmt (exitcond);
...@@ -2187,7 +2190,7 @@ replace_uses_equiv_to_x_with_y (struct loop *loop, tree stmt, tree x, ...@@ -2187,7 +2190,7 @@ replace_uses_equiv_to_x_with_y (struct loop *loop, tree stmt, tree x,
var = create_tmp_var (TREE_TYPE (use), "perfecttmp"); var = create_tmp_var (TREE_TYPE (use), "perfecttmp");
add_referenced_var (var); add_referenced_var (var);
val = force_gimple_operand_bsi (firstbsi, val, false, NULL); val = force_gimple_operand_bsi (firstbsi, val, false, NULL);
setstmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, var, val); setstmt = build_gimple_modify_stmt (var, val);
var = make_ssa_name (var, setstmt); var = make_ssa_name (var, setstmt);
GIMPLE_STMT_OPERAND (setstmt, 0) = var; GIMPLE_STMT_OPERAND (setstmt, 0) = var;
bsi_insert_before (firstbsi, setstmt, BSI_SAME_STMT); bsi_insert_before (firstbsi, setstmt, BSI_SAME_STMT);
...@@ -2535,8 +2538,7 @@ perfect_nestify (struct loop *loop, ...@@ -2535,8 +2538,7 @@ perfect_nestify (struct loop *loop,
exit_condition = get_loop_exit_condition (newloop); exit_condition = get_loop_exit_condition (newloop);
uboundvar = create_tmp_var (integer_type_node, "uboundvar"); uboundvar = create_tmp_var (integer_type_node, "uboundvar");
add_referenced_var (uboundvar); add_referenced_var (uboundvar);
stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, uboundvar, stmt = build_gimple_modify_stmt (uboundvar, VEC_index (tree, ubounds, 0));
VEC_index (tree, ubounds, 0));
uboundvar = make_ssa_name (uboundvar, stmt); uboundvar = make_ssa_name (uboundvar, stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = uboundvar; GIMPLE_STMT_OPERAND (stmt, 0) = uboundvar;
......
/* Default language-specific hooks. /* Default language-specific hooks.
Copyright 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Contributed by Alexandre Oliva <aoliva@redhat.com> Contributed by Alexandre Oliva <aoliva@redhat.com>
This file is part of GCC. This file is part of GCC.
...@@ -570,7 +571,7 @@ lhd_omp_predetermined_sharing (tree decl ATTRIBUTE_UNUSED) ...@@ -570,7 +571,7 @@ lhd_omp_predetermined_sharing (tree decl ATTRIBUTE_UNUSED)
tree tree
lhd_omp_assignment (tree clause ATTRIBUTE_UNUSED, tree dst, tree src) lhd_omp_assignment (tree clause ATTRIBUTE_UNUSED, tree dst, tree src)
{ {
return build2 (GIMPLE_MODIFY_STMT, void_type_node, dst, src); return build_gimple_modify_stmt (dst, src);
} }
/* Register language specific type size variables as potentially OpenMP /* Register language specific type size variables as potentially OpenMP
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
marshalling to implement data sharing and copying clauses. marshalling to implement data sharing and copying clauses.
Contributed by Diego Novillo <dnovillo@redhat.com> Contributed by Diego Novillo <dnovillo@redhat.com>
Copyright (C) 2005, 2006 Free Software Foundation, Inc. Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -1675,7 +1675,7 @@ lower_rec_input_clauses (tree clauses, tree *ilist, tree *dlist, ...@@ -1675,7 +1675,7 @@ lower_rec_input_clauses (tree clauses, tree *ilist, tree *dlist,
x = TYPE_SIZE_UNIT (TREE_TYPE (new_var)); x = TYPE_SIZE_UNIT (TREE_TYPE (new_var));
x = build_call_expr (built_in_decls[BUILT_IN_ALLOCA], 1, x); x = build_call_expr (built_in_decls[BUILT_IN_ALLOCA], 1, x);
x = fold_convert (TREE_TYPE (ptr), x); x = fold_convert (TREE_TYPE (ptr), x);
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, ptr, x); x = build_gimple_modify_stmt (ptr, x);
gimplify_and_add (x, ilist); gimplify_and_add (x, ilist);
} }
else if (is_reference (var)) else if (is_reference (var))
...@@ -1709,7 +1709,7 @@ lower_rec_input_clauses (tree clauses, tree *ilist, tree *dlist, ...@@ -1709,7 +1709,7 @@ lower_rec_input_clauses (tree clauses, tree *ilist, tree *dlist,
x = fold_convert (TREE_TYPE (new_var), x); x = fold_convert (TREE_TYPE (new_var), x);
} }
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, new_var, x); x = build_gimple_modify_stmt (new_var, x);
gimplify_and_add (x, ilist); gimplify_and_add (x, ilist);
new_var = build_fold_indirect_ref (new_var); new_var = build_fold_indirect_ref (new_var);
...@@ -1792,7 +1792,7 @@ lower_rec_input_clauses (tree clauses, tree *ilist, tree *dlist, ...@@ -1792,7 +1792,7 @@ lower_rec_input_clauses (tree clauses, tree *ilist, tree *dlist,
{ {
x = omp_reduction_init (c, TREE_TYPE (new_var)); x = omp_reduction_init (c, TREE_TYPE (new_var));
gcc_assert (TREE_CODE (TREE_TYPE (new_var)) != ARRAY_TYPE); gcc_assert (TREE_CODE (TREE_TYPE (new_var)) != ARRAY_TYPE);
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, new_var, x); x = build_gimple_modify_stmt (new_var, x);
gimplify_and_add (x, ilist); gimplify_and_add (x, ilist);
} }
break; break;
...@@ -1956,7 +1956,7 @@ lower_reduction_clauses (tree clauses, tree *stmt_list, omp_context *ctx) ...@@ -1956,7 +1956,7 @@ lower_reduction_clauses (tree clauses, tree *stmt_list, omp_context *ctx)
{ {
x = build2 (code, TREE_TYPE (ref), ref, new_var); x = build2 (code, TREE_TYPE (ref), ref, new_var);
ref = build_outer_var_ref (var, ctx); ref = build_outer_var_ref (var, ctx);
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, ref, x); x = build_gimple_modify_stmt (ref, x);
append_to_statement_list (x, &sub_list); append_to_statement_list (x, &sub_list);
} }
} }
...@@ -1993,7 +1993,7 @@ lower_copyprivate_clauses (tree clauses, tree *slist, tree *rlist, ...@@ -1993,7 +1993,7 @@ lower_copyprivate_clauses (tree clauses, tree *slist, tree *rlist,
ref = build_sender_ref (var, ctx); ref = build_sender_ref (var, ctx);
x = (ctx->is_nested) ? lookup_decl_in_outer_ctx (var, ctx) : var; x = (ctx->is_nested) ? lookup_decl_in_outer_ctx (var, ctx) : var;
x = by_ref ? build_fold_addr_expr (x) : x; x = by_ref ? build_fold_addr_expr (x) : x;
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, ref, x); x = build_gimple_modify_stmt (ref, x);
gimplify_and_add (x, slist); gimplify_and_add (x, slist);
ref = build_receiver_ref (var, by_ref, ctx); ref = build_receiver_ref (var, by_ref, ctx);
...@@ -2074,14 +2074,14 @@ lower_send_clauses (tree clauses, tree *ilist, tree *olist, omp_context *ctx) ...@@ -2074,14 +2074,14 @@ lower_send_clauses (tree clauses, tree *ilist, tree *olist, omp_context *ctx)
{ {
ref = build_sender_ref (val, ctx); ref = build_sender_ref (val, ctx);
x = by_ref ? build_fold_addr_expr (var) : var; x = by_ref ? build_fold_addr_expr (var) : var;
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, ref, x); x = build_gimple_modify_stmt (ref, x);
gimplify_and_add (x, ilist); gimplify_and_add (x, ilist);
} }
if (do_out) if (do_out)
{ {
ref = build_sender_ref (val, ctx); ref = build_sender_ref (val, ctx);
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, var, ref); x = build_gimple_modify_stmt (var, ref);
gimplify_and_add (x, olist); gimplify_and_add (x, olist);
} }
} }
...@@ -2118,17 +2118,17 @@ lower_send_shared_vars (tree *ilist, tree *olist, omp_context *ctx) ...@@ -2118,17 +2118,17 @@ lower_send_shared_vars (tree *ilist, tree *olist, omp_context *ctx)
{ {
x = build_sender_ref (ovar, ctx); x = build_sender_ref (ovar, ctx);
var = build_fold_addr_expr (var); var = build_fold_addr_expr (var);
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, x, var); x = build_gimple_modify_stmt (x, var);
gimplify_and_add (x, ilist); gimplify_and_add (x, ilist);
} }
else else
{ {
x = build_sender_ref (ovar, ctx); x = build_sender_ref (ovar, ctx);
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, x, var); x = build_gimple_modify_stmt (x, var);
gimplify_and_add (x, ilist); gimplify_and_add (x, ilist);
x = build_sender_ref (ovar, ctx); x = build_sender_ref (ovar, ctx);
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, var, x); x = build_gimple_modify_stmt (var, x);
gimplify_and_add (x, olist); gimplify_and_add (x, olist);
} }
} }
...@@ -2226,14 +2226,14 @@ expand_parallel_call (struct omp_region *region, basic_block bb, ...@@ -2226,14 +2226,14 @@ expand_parallel_call (struct omp_region *region, basic_block bb,
si = bsi_start (then_bb); si = bsi_start (then_bb);
t = build1 (LABEL_EXPR, void_type_node, then_lab); t = build1 (LABEL_EXPR, void_type_node, then_lab);
bsi_insert_after (&si, t, BSI_CONTINUE_LINKING); bsi_insert_after (&si, t, BSI_CONTINUE_LINKING);
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, tmp, val); t = build_gimple_modify_stmt (tmp, val);
bsi_insert_after (&si, t, BSI_CONTINUE_LINKING); bsi_insert_after (&si, t, BSI_CONTINUE_LINKING);
si = bsi_start (else_bb); si = bsi_start (else_bb);
t = build1 (LABEL_EXPR, void_type_node, else_lab); t = build1 (LABEL_EXPR, void_type_node, else_lab);
bsi_insert_after (&si, t, BSI_CONTINUE_LINKING); bsi_insert_after (&si, t, BSI_CONTINUE_LINKING);
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, tmp, t = build_gimple_modify_stmt (tmp,
build_int_cst (unsigned_type_node, 1)); build_int_cst (unsigned_type_node, 1));
bsi_insert_after (&si, t, BSI_CONTINUE_LINKING); bsi_insert_after (&si, t, BSI_CONTINUE_LINKING);
make_edge (cond_bb, then_bb, EDGE_TRUE_VALUE); make_edge (cond_bb, then_bb, EDGE_TRUE_VALUE);
...@@ -2640,11 +2640,11 @@ expand_omp_for_generic (struct omp_region *region, ...@@ -2640,11 +2640,11 @@ expand_omp_for_generic (struct omp_region *region,
/* Iteration setup for sequential loop goes in L0_BB. */ /* Iteration setup for sequential loop goes in L0_BB. */
list = alloc_stmt_list (); list = alloc_stmt_list ();
t = fold_convert (type, istart0); t = fold_convert (type, istart0);
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, fd->v, t); t = build_gimple_modify_stmt (fd->v, t);
gimplify_and_add (t, &list); gimplify_and_add (t, &list);
t = fold_convert (type, iend0); t = fold_convert (type, iend0);
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, iend, t); t = build_gimple_modify_stmt (iend, t);
gimplify_and_add (t, &list); gimplify_and_add (t, &list);
si = bsi_start (l0_bb); si = bsi_start (l0_bb);
...@@ -2666,7 +2666,7 @@ expand_omp_for_generic (struct omp_region *region, ...@@ -2666,7 +2666,7 @@ expand_omp_for_generic (struct omp_region *region,
list = alloc_stmt_list (); list = alloc_stmt_list ();
t = build2 (PLUS_EXPR, type, fd->v, fd->step); t = build2 (PLUS_EXPR, type, fd->v, fd->step);
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, fd->v, t); t = build_gimple_modify_stmt (fd->v, t);
gimplify_and_add (t, &list); gimplify_and_add (t, &list);
t = build2 (fd->cond_code, boolean_type_node, fd->v, iend); t = build2 (fd->cond_code, boolean_type_node, fd->v, iend);
...@@ -2841,7 +2841,7 @@ expand_omp_for_static_nochunk (struct omp_region *region, ...@@ -2841,7 +2841,7 @@ expand_omp_for_static_nochunk (struct omp_region *region,
t = fold_convert (type, s0); t = fold_convert (type, s0);
t = build2 (MULT_EXPR, type, t, fd->step); t = build2 (MULT_EXPR, type, t, fd->step);
t = build2 (PLUS_EXPR, type, t, fd->n1); t = build2 (PLUS_EXPR, type, t, fd->n1);
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, fd->v, t); t = build_gimple_modify_stmt (fd->v, t);
gimplify_and_add (t, &list); gimplify_and_add (t, &list);
t = fold_convert (type, e0); t = fold_convert (type, e0);
...@@ -2856,7 +2856,7 @@ expand_omp_for_static_nochunk (struct omp_region *region, ...@@ -2856,7 +2856,7 @@ expand_omp_for_static_nochunk (struct omp_region *region,
list = alloc_stmt_list (); list = alloc_stmt_list ();
t = build2 (PLUS_EXPR, type, fd->v, fd->step); t = build2 (PLUS_EXPR, type, fd->v, fd->step);
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, fd->v, t); t = build_gimple_modify_stmt (fd->v, t);
gimplify_and_add (t, &list); gimplify_and_add (t, &list);
t = build2 (fd->cond_code, boolean_type_node, fd->v, e); t = build2 (fd->cond_code, boolean_type_node, fd->v, e);
...@@ -3023,7 +3023,7 @@ expand_omp_for_static_chunk (struct omp_region *region, struct omp_for_data *fd) ...@@ -3023,7 +3023,7 @@ expand_omp_for_static_chunk (struct omp_region *region, struct omp_for_data *fd)
t = fold_convert (type, s0); t = fold_convert (type, s0);
t = build2 (MULT_EXPR, type, t, fd->step); t = build2 (MULT_EXPR, type, t, fd->step);
t = build2 (PLUS_EXPR, type, t, fd->n1); t = build2 (PLUS_EXPR, type, t, fd->n1);
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, fd->v, t); t = build_gimple_modify_stmt (fd->v, t);
gimplify_and_add (t, &list); gimplify_and_add (t, &list);
t = fold_convert (type, e0); t = fold_convert (type, e0);
...@@ -3039,7 +3039,7 @@ expand_omp_for_static_chunk (struct omp_region *region, struct omp_for_data *fd) ...@@ -3039,7 +3039,7 @@ expand_omp_for_static_chunk (struct omp_region *region, struct omp_for_data *fd)
list = alloc_stmt_list (); list = alloc_stmt_list ();
t = build2 (PLUS_EXPR, type, fd->v, fd->step); t = build2 (PLUS_EXPR, type, fd->v, fd->step);
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, fd->v, t); t = build_gimple_modify_stmt (fd->v, t);
gimplify_and_add (t, &list); gimplify_and_add (t, &list);
t = build2 (fd->cond_code, boolean_type_node, fd->v, e); t = build2 (fd->cond_code, boolean_type_node, fd->v, e);
...@@ -3058,7 +3058,7 @@ expand_omp_for_static_chunk (struct omp_region *region, struct omp_for_data *fd) ...@@ -3058,7 +3058,7 @@ expand_omp_for_static_chunk (struct omp_region *region, struct omp_for_data *fd)
t = build_int_cst (type, 1); t = build_int_cst (type, 1);
t = build2 (PLUS_EXPR, type, trip, t); t = build2 (PLUS_EXPR, type, trip, t);
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, trip, t); t = build_gimple_modify_stmt (trip, t);
gimplify_and_add (t, &list); gimplify_and_add (t, &list);
si = bsi_start (trip_update_bb); si = bsi_start (trip_update_bb);
...@@ -3206,7 +3206,7 @@ expand_omp_sections (struct omp_region *region) ...@@ -3206,7 +3206,7 @@ expand_omp_sections (struct omp_region *region)
t = build_int_cst (unsigned_type_node, len); t = build_int_cst (unsigned_type_node, len);
u = built_in_decls[BUILT_IN_GOMP_SECTIONS_START]; u = built_in_decls[BUILT_IN_GOMP_SECTIONS_START];
t = build_call_expr (u, 1, t); t = build_call_expr (u, 1, t);
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, v, t); t = build_gimple_modify_stmt (v, t);
bsi_insert_after (&si, t, BSI_SAME_STMT); bsi_insert_after (&si, t, BSI_SAME_STMT);
} }
bsi_remove (&si, true); bsi_remove (&si, true);
...@@ -3273,7 +3273,7 @@ expand_omp_sections (struct omp_region *region) ...@@ -3273,7 +3273,7 @@ expand_omp_sections (struct omp_region *region)
gcc_assert (TREE_CODE (bsi_stmt (si)) == OMP_CONTINUE); gcc_assert (TREE_CODE (bsi_stmt (si)) == OMP_CONTINUE);
t = build_call_expr (built_in_decls[BUILT_IN_GOMP_SECTIONS_NEXT], 0); t = build_call_expr (built_in_decls[BUILT_IN_GOMP_SECTIONS_NEXT], 0);
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, v, t); t = build_gimple_modify_stmt (v, t);
bsi_insert_after (&si, t, BSI_SAME_STMT); bsi_insert_after (&si, t, BSI_SAME_STMT);
bsi_remove (&si, true); bsi_remove (&si, true);
} }
...@@ -3709,7 +3709,7 @@ lower_omp_single_copy (tree single_stmt, tree *pre_p, omp_context *ctx) ...@@ -3709,7 +3709,7 @@ lower_omp_single_copy (tree single_stmt, tree *pre_p, omp_context *ctx)
t = build_call_expr (built_in_decls[BUILT_IN_GOMP_SINGLE_COPY_START], 0); t = build_call_expr (built_in_decls[BUILT_IN_GOMP_SINGLE_COPY_START], 0);
t = fold_convert (ptr_type, t); t = fold_convert (ptr_type, t);
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, ctx->receiver_decl, t); t = build_gimple_modify_stmt (ctx->receiver_decl, t);
gimplify_and_add (t, pre_p); gimplify_and_add (t, pre_p);
t = build2 (EQ_EXPR, boolean_type_node, ctx->receiver_decl, t = build2 (EQ_EXPR, boolean_type_node, ctx->receiver_decl,
...@@ -3994,7 +3994,7 @@ lower_omp_for_lastprivate (struct omp_for_data *fd, tree *body_p, ...@@ -3994,7 +3994,7 @@ lower_omp_for_lastprivate (struct omp_for_data *fd, tree *body_p,
/* Initialize the iterator variable, so that threads that don't execute /* Initialize the iterator variable, so that threads that don't execute
any iterations don't execute the lastprivate clauses by accident. */ any iterations don't execute the lastprivate clauses by accident. */
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, fd->v, vinit); t = build_gimple_modify_stmt (fd->v, vinit);
gimplify_and_add (t, body_p); gimplify_and_add (t, body_p);
} }
} }
...@@ -4134,7 +4134,7 @@ lower_omp_parallel (tree *stmt_p, omp_context *ctx) ...@@ -4134,7 +4134,7 @@ lower_omp_parallel (tree *stmt_p, omp_context *ctx)
t = build_fold_addr_expr (ctx->sender_decl); t = build_fold_addr_expr (ctx->sender_decl);
/* fixup_child_record_type might have changed receiver_decl's type. */ /* fixup_child_record_type might have changed receiver_decl's type. */
t = fold_convert (TREE_TYPE (ctx->receiver_decl), t); t = fold_convert (TREE_TYPE (ctx->receiver_decl), t);
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, ctx->receiver_decl, t); t = build_gimple_modify_stmt (ctx->receiver_decl, t);
append_to_statement_list (t, &new_body); append_to_statement_list (t, &new_body);
} }
...@@ -4186,7 +4186,7 @@ init_tmp_var (tree exp, tree_stmt_iterator *tsi) ...@@ -4186,7 +4186,7 @@ init_tmp_var (tree exp, tree_stmt_iterator *tsi)
t = create_tmp_var (TREE_TYPE (exp), NULL); t = create_tmp_var (TREE_TYPE (exp), NULL);
DECL_GIMPLE_REG_P (t) = 1; DECL_GIMPLE_REG_P (t) = 1;
stmt = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (t), t, exp); stmt = build_gimple_modify_stmt (t, exp);
SET_EXPR_LOCUS (stmt, EXPR_LOCUS (tsi_stmt (*tsi))); SET_EXPR_LOCUS (stmt, EXPR_LOCUS (tsi_stmt (*tsi)));
tsi_link_before (tsi, stmt, TSI_SAME_STMT); tsi_link_before (tsi, stmt, TSI_SAME_STMT);
...@@ -4203,7 +4203,7 @@ save_tmp_var (tree exp, tree_stmt_iterator *tsi) ...@@ -4203,7 +4203,7 @@ save_tmp_var (tree exp, tree_stmt_iterator *tsi)
t = create_tmp_var (TREE_TYPE (exp), NULL); t = create_tmp_var (TREE_TYPE (exp), NULL);
DECL_GIMPLE_REG_P (t) = 1; DECL_GIMPLE_REG_P (t) = 1;
stmt = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (t), exp, t); stmt = build_gimple_modify_stmt (exp, t);
SET_EXPR_LOCUS (stmt, EXPR_LOCUS (tsi_stmt (*tsi))); SET_EXPR_LOCUS (stmt, EXPR_LOCUS (tsi_stmt (*tsi)));
tsi_link_after (tsi, stmt, TSI_SAME_STMT); tsi_link_after (tsi, stmt, TSI_SAME_STMT);
......
/* Transformations based on profile information for values. /* Transformations based on profile information for values.
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -523,9 +523,8 @@ tree_divmod_fixed_value (tree stmt, tree operation, ...@@ -523,9 +523,8 @@ tree_divmod_fixed_value (tree stmt, tree operation,
tmpv = create_tmp_var (optype, "PROF"); tmpv = create_tmp_var (optype, "PROF");
tmp1 = create_tmp_var (optype, "PROF"); tmp1 = create_tmp_var (optype, "PROF");
stmt1 = build2 (GIMPLE_MODIFY_STMT, optype, tmpv, stmt1 = build_gimple_modify_stmt (tmpv, fold_convert (optype, value));
fold_convert (optype, value)); stmt2 = build_gimple_modify_stmt (tmp1, op2);
stmt2 = build2 (GIMPLE_MODIFY_STMT, optype, tmp1, op2);
stmt3 = build3 (COND_EXPR, void_type_node, stmt3 = build3 (COND_EXPR, void_type_node,
build2 (NE_EXPR, boolean_type_node, tmp1, tmpv), build2 (NE_EXPR, boolean_type_node, tmp1, tmpv),
build1 (GOTO_EXPR, void_type_node, label_decl2), build1 (GOTO_EXPR, void_type_node, label_decl2),
...@@ -537,15 +536,17 @@ tree_divmod_fixed_value (tree stmt, tree operation, ...@@ -537,15 +536,17 @@ tree_divmod_fixed_value (tree stmt, tree operation,
tmp2 = create_tmp_var (optype, "PROF"); tmp2 = create_tmp_var (optype, "PROF");
label1 = build1 (LABEL_EXPR, void_type_node, label_decl1); label1 = build1 (LABEL_EXPR, void_type_node, label_decl1);
stmt1 = build2 (GIMPLE_MODIFY_STMT, optype, tmp2, stmt1 = build_gimple_modify_stmt (tmp2,
build2 (TREE_CODE (operation), optype, op1, tmpv)); build2 (TREE_CODE (operation), optype,
op1, tmpv));
bsi_insert_before (&bsi, label1, BSI_SAME_STMT); bsi_insert_before (&bsi, label1, BSI_SAME_STMT);
bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT); bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
bb2end = stmt1; bb2end = stmt1;
label2 = build1 (LABEL_EXPR, void_type_node, label_decl2); label2 = build1 (LABEL_EXPR, void_type_node, label_decl2);
stmt1 = build2 (GIMPLE_MODIFY_STMT, optype, tmp2, stmt1 = build_gimple_modify_stmt (tmp2,
build2 (TREE_CODE (operation), optype, op1, op2)); build2 (TREE_CODE (operation), optype,
op1, op2));
bsi_insert_before (&bsi, label2, BSI_SAME_STMT); bsi_insert_before (&bsi, label2, BSI_SAME_STMT);
bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT); bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
bb3end = stmt1; bb3end = stmt1;
...@@ -680,10 +681,11 @@ tree_mod_pow2 (tree stmt, tree operation, tree op1, tree op2, int prob, ...@@ -680,10 +681,11 @@ tree_mod_pow2 (tree stmt, tree operation, tree op1, tree op2, int prob,
tmp2 = create_tmp_var (optype, "PROF"); tmp2 = create_tmp_var (optype, "PROF");
tmp3 = create_tmp_var (optype, "PROF"); tmp3 = create_tmp_var (optype, "PROF");
stmt2 = build2 (GIMPLE_MODIFY_STMT, optype, tmp2, stmt2 = build_gimple_modify_stmt (tmp2,
build2 (PLUS_EXPR, optype, op2, build_int_cst (optype, -1))); build2 (PLUS_EXPR, optype, op2,
stmt3 = build2 (GIMPLE_MODIFY_STMT, optype, tmp3, build_int_cst (optype, -1)));
build2 (BIT_AND_EXPR, optype, tmp2, op2)); stmt3 = build_gimple_modify_stmt (tmp3,
build2 (BIT_AND_EXPR, optype, tmp2, op2));
stmt4 = build3 (COND_EXPR, void_type_node, stmt4 = build3 (COND_EXPR, void_type_node,
build2 (NE_EXPR, boolean_type_node, build2 (NE_EXPR, boolean_type_node,
tmp3, build_int_cst (optype, 0)), tmp3, build_int_cst (optype, 0)),
...@@ -696,15 +698,16 @@ tree_mod_pow2 (tree stmt, tree operation, tree op1, tree op2, int prob, ...@@ -696,15 +698,16 @@ tree_mod_pow2 (tree stmt, tree operation, tree op1, tree op2, int prob,
/* tmp2 == op2-1 inherited from previous block */ /* tmp2 == op2-1 inherited from previous block */
label1 = build1 (LABEL_EXPR, void_type_node, label_decl1); label1 = build1 (LABEL_EXPR, void_type_node, label_decl1);
stmt1 = build2 (GIMPLE_MODIFY_STMT, optype, result, stmt1 = build_gimple_modify_stmt (result,
build2 (BIT_AND_EXPR, optype, op1, tmp2)); build2 (BIT_AND_EXPR, optype, op1, tmp2));
bsi_insert_before (&bsi, label1, BSI_SAME_STMT); bsi_insert_before (&bsi, label1, BSI_SAME_STMT);
bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT); bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
bb2end = stmt1; bb2end = stmt1;
label2 = build1 (LABEL_EXPR, void_type_node, label_decl2); label2 = build1 (LABEL_EXPR, void_type_node, label_decl2);
stmt1 = build2 (GIMPLE_MODIFY_STMT, optype, result, stmt1 = build_gimple_modify_stmt (result,
build2 (TREE_CODE (operation), optype, op1, op2)); build2 (TREE_CODE (operation), optype,
op1, op2));
bsi_insert_before (&bsi, label2, BSI_SAME_STMT); bsi_insert_before (&bsi, label2, BSI_SAME_STMT);
bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT); bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
bb3end = stmt1; bb3end = stmt1;
...@@ -838,8 +841,8 @@ tree_mod_subtract (tree stmt, tree operation, tree op1, tree op2, ...@@ -838,8 +841,8 @@ tree_mod_subtract (tree stmt, tree operation, tree op1, tree op2,
bsi = bsi_for_stmt (stmt); bsi = bsi_for_stmt (stmt);
tmp1 = create_tmp_var (optype, "PROF"); tmp1 = create_tmp_var (optype, "PROF");
stmt1 = build2 (GIMPLE_MODIFY_STMT, optype, result, op1); stmt1 = build_gimple_modify_stmt (result, op1);
stmt2 = build2 (GIMPLE_MODIFY_STMT, optype, tmp1, op2); stmt2 = build_gimple_modify_stmt (tmp1, op2);
stmt3 = build3 (COND_EXPR, void_type_node, stmt3 = build3 (COND_EXPR, void_type_node,
build2 (LT_EXPR, boolean_type_node, result, tmp1), build2 (LT_EXPR, boolean_type_node, result, tmp1),
build1 (GOTO_EXPR, void_type_node, label_decl3), build1 (GOTO_EXPR, void_type_node, label_decl3),
...@@ -853,8 +856,9 @@ tree_mod_subtract (tree stmt, tree operation, tree op1, tree op2, ...@@ -853,8 +856,9 @@ tree_mod_subtract (tree stmt, tree operation, tree op1, tree op2,
if (ncounts) /* Assumed to be 0 or 1 */ if (ncounts) /* Assumed to be 0 or 1 */
{ {
label1 = build1 (LABEL_EXPR, void_type_node, label_decl1); label1 = build1 (LABEL_EXPR, void_type_node, label_decl1);
stmt1 = build2 (GIMPLE_MODIFY_STMT, optype, result, stmt1 = build_gimple_modify_stmt (result,
build2 (MINUS_EXPR, optype, result, tmp1)); build2 (MINUS_EXPR, optype,
result, tmp1));
stmt2 = build3 (COND_EXPR, void_type_node, stmt2 = build3 (COND_EXPR, void_type_node,
build2 (LT_EXPR, boolean_type_node, result, tmp1), build2 (LT_EXPR, boolean_type_node, result, tmp1),
build1 (GOTO_EXPR, void_type_node, label_decl3), build1 (GOTO_EXPR, void_type_node, label_decl3),
...@@ -867,8 +871,9 @@ tree_mod_subtract (tree stmt, tree operation, tree op1, tree op2, ...@@ -867,8 +871,9 @@ tree_mod_subtract (tree stmt, tree operation, tree op1, tree op2,
/* Fallback case. */ /* Fallback case. */
label2 = build1 (LABEL_EXPR, void_type_node, label_decl2); label2 = build1 (LABEL_EXPR, void_type_node, label_decl2);
stmt1 = build2 (GIMPLE_MODIFY_STMT, optype, result, stmt1 = build_gimple_modify_stmt (result,
build2 (TREE_CODE (operation), optype, result, tmp1)); build2 (TREE_CODE (operation), optype,
result, tmp1));
bsi_insert_before (&bsi, label2, BSI_SAME_STMT); bsi_insert_before (&bsi, label2, BSI_SAME_STMT);
bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT); bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
bb3end = stmt1; bb3end = stmt1;
...@@ -1055,7 +1060,7 @@ tree_ic (tree stmt, tree call, struct cgraph_node* direct_call, ...@@ -1055,7 +1060,7 @@ tree_ic (tree stmt, tree call, struct cgraph_node* direct_call,
int prob, gcov_type count, gcov_type all) int prob, gcov_type count, gcov_type all)
{ {
tree stmt1, stmt2, stmt3; tree stmt1, stmt2, stmt3;
tree tmp1, tmpv; tree tmp1, tmpv, tmp;
tree label_decl1 = create_artificial_label (); tree label_decl1 = create_artificial_label ();
tree label_decl2 = create_artificial_label (); tree label_decl2 = create_artificial_label ();
tree label1, label2; tree label1, label2;
...@@ -1072,11 +1077,11 @@ tree_ic (tree stmt, tree call, struct cgraph_node* direct_call, ...@@ -1072,11 +1077,11 @@ tree_ic (tree stmt, tree call, struct cgraph_node* direct_call,
tmpv = create_tmp_var (optype, "PROF"); tmpv = create_tmp_var (optype, "PROF");
tmp1 = create_tmp_var (optype, "PROF"); tmp1 = create_tmp_var (optype, "PROF");
stmt1 = build2 (GIMPLE_MODIFY_STMT, optype, tmpv, stmt1 = build_gimple_modify_stmt (tmpv,
unshare_expr (CALL_EXPR_FN (call))); unshare_expr (CALL_EXPR_FN (call)));
stmt2 = build2 (GIMPLE_MODIFY_STMT, optype, tmp1, tmp = fold_convert (optype, build_addr (direct_call->decl,
fold_convert (optype, build_addr (direct_call->decl, current_function_decl));
current_function_decl))); stmt2 = build_gimple_modify_stmt (tmp1, tmp);
stmt3 = build3 (COND_EXPR, void_type_node, stmt3 = build3 (COND_EXPR, void_type_node,
build2 (NE_EXPR, boolean_type_node, tmp1, tmpv), build2 (NE_EXPR, boolean_type_node, tmp1, tmpv),
build1 (GOTO_EXPR, void_type_node, label_decl2), build1 (GOTO_EXPR, void_type_node, label_decl2),
...@@ -1279,9 +1284,8 @@ tree_stringop_fixed_value (tree stmt, tree value, int prob, gcov_type count, ...@@ -1279,9 +1284,8 @@ tree_stringop_fixed_value (tree stmt, tree value, int prob, gcov_type count,
tmpv = create_tmp_var (optype, "PROF"); tmpv = create_tmp_var (optype, "PROF");
tmp1 = create_tmp_var (optype, "PROF"); tmp1 = create_tmp_var (optype, "PROF");
stmt1 = build2 (GIMPLE_MODIFY_STMT, optype, tmpv, stmt1 = build_gimple_modify_stmt (tmpv, fold_convert (optype, value));
fold_convert (optype, value)); stmt2 = build_gimple_modify_stmt (tmp1, blck_size);
stmt2 = build2 (GIMPLE_MODIFY_STMT, optype, tmp1, blck_size);
stmt3 = build3 (COND_EXPR, void_type_node, stmt3 = build3 (COND_EXPR, void_type_node,
build2 (NE_EXPR, boolean_type_node, tmp1, tmpv), build2 (NE_EXPR, boolean_type_node, tmp1, tmpv),
build1 (GOTO_EXPR, void_type_node, label_decl2), build1 (GOTO_EXPR, void_type_node, label_decl2),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment