Commit ebb07520 by Roger Sayle Committed by Roger Sayle

tree-eh.c (do_return_redirection): Call build_gimple_modify_stmt instead of…

tree-eh.c (do_return_redirection): Call build_gimple_modify_stmt instead of calling build2 with a GIMPLE_MODIFY_STMT.


	* tree-eh.c (do_return_redirection): Call build_gimple_modify_stmt
	instead of calling build2 with a GIMPLE_MODIFY_STMT.
	(honor_protect_cleanup_actions, lower_try_finally_switch):
	Likewise.
	* tree-if-conv.c (replace_phi_with_cond_gimple_modify_stmt,
	ifc_temp_var): Likewise.
	* tree-inline.c (setup_one_parameter): Likewise.
	* tree-mudflap.c (mf_decl_cache_locals,
	mf_build_check_statement_for): Likewise.
	* tree-nested.c (init_tmp_var, save_tmp_var,
	finalize_nesting_tree_1): Likewise.
	* tree-outof-ssa.c (insert_copy_on_edge,
	insert_backedge_copies): Likewise.
	* tree-profile.c (tree_gen_edge_profiler,
	tree_gen_ic_profiler): Likewise.
	* tree-scalar-evolution.c (scev_const_prop): Likewise.
	* tree-sra.c (sra_build_assignment): Likewise.
	* tree-ssa-loop-im.c (determine_invariantness_stmt): Likewise.
	* tree-ssa-math-opts.c (insert_reciprocals,
	execute_cse_sincos_1): Likewise.
	* tree-tailcall.c (adjust_accumulator_values,
	adjust_return_value): Likewise.
	* tree-vect-patterns.c (vect_pattern_recog_1): Likewise.
	* tree-vect-transform.c (vect_create_data_ref_ptr,
	bump_vector_ptr, vect_init_vector, get_initial_def_for_induction,
	vect_create_epilog_for_reduction, vectorizable_reduction,
	vectorizable_call, vectorizable_conversion,
	vectorizable_assignment, vectorizable_operation,
	vectorizable_type_demotion, vect_gen_widened_results_half,
	vect_permute_store_chain, vectorizable_store,
	vect_setup_realignment, vect_permute_load_chain,
	vectorizable_load, vectorizable_condition,
	vect_create_cond_for_align_checks): Likewise.
	* tree-vrp.c (build_assert_expr_for): Likewise.

From-SVN: r122707
parent 0c948c27
2007-03-08 Roger Sayle <roger@eyesopen.com>
* tree-eh.c (do_return_redirection): Call build_gimple_modify_stmt
instead of calling build2 with a GIMPLE_MODIFY_STMT.
(honor_protect_cleanup_actions, lower_try_finally_switch):
Likewise.
* tree-if-conv.c (replace_phi_with_cond_gimple_modify_stmt,
ifc_temp_var): Likewise.
* tree-inline.c (setup_one_parameter): Likewise.
* tree-mudflap.c (mf_decl_cache_locals,
mf_build_check_statement_for): Likewise.
* tree-nested.c (init_tmp_var, save_tmp_var,
finalize_nesting_tree_1): Likewise.
* tree-outof-ssa.c (insert_copy_on_edge,
insert_backedge_copies): Likewise.
* tree-profile.c (tree_gen_edge_profiler,
tree_gen_ic_profiler): Likewise.
* tree-scalar-evolution.c (scev_const_prop): Likewise.
* tree-sra.c (sra_build_assignment): Likewise.
* tree-ssa-loop-im.c (determine_invariantness_stmt): Likewise.
* tree-ssa-math-opts.c (insert_reciprocals,
execute_cse_sincos_1): Likewise.
* tree-tailcall.c (adjust_accumulator_values,
adjust_return_value): Likewise.
* tree-vect-patterns.c (vect_pattern_recog_1): Likewise.
* tree-vect-transform.c (vect_create_data_ref_ptr,
bump_vector_ptr, vect_init_vector, get_initial_def_for_induction,
vect_create_epilog_for_reduction, vectorizable_reduction,
vectorizable_call, vectorizable_conversion,
vectorizable_assignment, vectorizable_operation,
vectorizable_type_demotion, vect_gen_widened_results_half,
vect_permute_store_chain, vectorizable_store,
vect_setup_realignment, vect_permute_load_chain,
vectorizable_load, vectorizable_condition,
vect_create_cond_for_align_checks): Likewise.
* tree-vrp.c (build_assert_expr_for): Likewise.
2007-03-08 Ian Lance Taylor <iant@google.com>
* tree-vrp.c: Include "intl.h".
......
......@@ -634,13 +634,13 @@ do_return_redirection (struct goto_queue_node *q, tree finlab, tree mod,
else
new = *return_value_p;
x = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (new), new, old);
x = build_gimple_modify_stmt (new, old);
append_to_statement_list (x, &q->repl_stmt);
if (new == result)
x = result;
else
x = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (result), result, new);
x = build_gimple_modify_stmt (result, new);
q->cont_stmt = build1 (RETURN_EXPR, void_type_node, x);
}
......@@ -830,20 +830,20 @@ honor_protect_cleanup_actions (struct leh_state *outer_state,
i = tsi_start (finally);
x = build0 (EXC_PTR_EXPR, ptr_type_node);
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, save_eptr, x);
x = build_gimple_modify_stmt (save_eptr, x);
tsi_link_before (&i, x, TSI_CONTINUE_LINKING);
x = build0 (FILTER_EXPR, integer_type_node);
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, save_filt, x);
x = build_gimple_modify_stmt (save_filt, x);
tsi_link_before (&i, x, TSI_CONTINUE_LINKING);
i = tsi_last (finally);
x = build0 (EXC_PTR_EXPR, ptr_type_node);
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, x, save_eptr);
x = build_gimple_modify_stmt (x, save_eptr);
tsi_link_after (&i, x, TSI_CONTINUE_LINKING);
x = build0 (FILTER_EXPR, integer_type_node);
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, x, save_filt);
x = build_gimple_modify_stmt (x, save_filt);
tsi_link_after (&i, x, TSI_CONTINUE_LINKING);
x = build_resx (get_eh_region_number (tf->region));
......@@ -1165,8 +1165,9 @@ lower_try_finally_switch (struct leh_state *state, struct leh_tf_state *tf)
if (tf->may_fallthru)
{
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, finally_tmp,
build_int_cst (NULL_TREE, fallthru_index));
x = build_gimple_modify_stmt (finally_tmp,
build_int_cst (integer_type_node,
fallthru_index));
append_to_statement_list (x, tf->top_p);
if (tf->may_throw)
......@@ -1195,8 +1196,9 @@ lower_try_finally_switch (struct leh_state *state, struct leh_tf_state *tf)
x = build1 (LABEL_EXPR, void_type_node, tf->eh_label);
append_to_statement_list (x, tf->top_p);
x = build2 (GIMPLE_MODIFY_STMT, void_type_node, finally_tmp,
build_int_cst (NULL_TREE, eh_index));
x = build_gimple_modify_stmt (finally_tmp,
build_int_cst (integer_type_node,
eh_index));
append_to_statement_list (x, tf->top_p);
last_case = build3 (CASE_LABEL_EXPR, void_type_node,
......@@ -1227,15 +1229,17 @@ lower_try_finally_switch (struct leh_state *state, struct leh_tf_state *tf)
if (q->index < 0)
{
mod = build2 (GIMPLE_MODIFY_STMT, void_type_node, finally_tmp,
build_int_cst (NULL_TREE, return_index));
mod = build_gimple_modify_stmt (finally_tmp,
build_int_cst (integer_type_node,
return_index));
do_return_redirection (q, finally_label, mod, &return_val);
switch_id = return_index;
}
else
{
mod = build2 (GIMPLE_MODIFY_STMT, void_type_node, finally_tmp,
build_int_cst (NULL_TREE, q->index));
mod = build_gimple_modify_stmt (finally_tmp,
build_int_cst (integer_type_node,
q->index));
do_goto_redirection (q, finally_label, mod);
switch_id = q->index;
}
......
/* If-conversion for vectorizer.
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Contributed by Devang Patel <dpatel@apple.com>
This file is part of GCC.
......@@ -802,8 +802,7 @@ replace_phi_with_cond_gimple_modify_stmt (tree phi, tree cond,
unshare_expr (arg_1));
/* Create new MODIFY expression using RHS. */
new_stmt = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (PHI_RESULT (phi)),
unshare_expr (PHI_RESULT (phi)), rhs);
new_stmt = build_gimple_modify_stmt (unshare_expr (PHI_RESULT (phi)), rhs);
/* Make new statement definition of the original phi result. */
SSA_NAME_DEF_STMT (PHI_RESULT (phi)) = new_stmt;
......@@ -983,7 +982,7 @@ ifc_temp_var (tree type, tree exp)
add_referenced_var (var);
/* Build new statement to assign EXP to new variable. */
stmt = build2 (GIMPLE_MODIFY_STMT, type, var, exp);
stmt = build_gimple_modify_stmt (var, exp);
/* Get SSA name for the new variable and set make new statement
its definition statement. */
......
/* Tree inlining.
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>
This file is part of GCC.
......@@ -1399,13 +1400,13 @@ setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn,
if (def && gimple_in_ssa_p (cfun) && is_gimple_reg (p))
{
def = remap_ssa_name (def, id);
init_stmt = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (var), def, rhs);
init_stmt = build_gimple_modify_stmt (def, rhs);
SSA_NAME_DEF_STMT (def) = init_stmt;
SSA_NAME_IS_DEFAULT_DEF (def) = 0;
set_default_def (var, NULL);
}
else
init_stmt = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (var), var, rhs);
init_stmt = build_gimple_modify_stmt (var, rhs);
/* If we did not create a gimple value and we did not create a gimple
cast of a gimple value, then we will need to gimplify INIT_STMTS
......
/* Mudflap: narrow-pointer bounds-checking by tree rewriting.
Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Contributed by Frank Ch. Eigler <fche@redhat.com>
and Graydon Hoare <graydon@redhat.com>
......@@ -458,14 +459,12 @@ mf_decl_cache_locals (void)
/* Build initialization nodes for the cache vars. We just load the
globals into the cache variables. */
t = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (mf_cache_shift_decl_l),
mf_cache_shift_decl_l, mf_cache_shift_decl);
t = build_gimple_modify_stmt (mf_cache_shift_decl_l, mf_cache_shift_decl);
SET_EXPR_LOCATION (t, DECL_SOURCE_LOCATION (current_function_decl));
gimplify_to_stmt_list (&t);
shift_init_stmts = t;
t = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (mf_cache_mask_decl_l),
mf_cache_mask_decl_l, mf_cache_mask_decl);
t = build_gimple_modify_stmt (mf_cache_mask_decl_l, mf_cache_mask_decl);
SET_EXPR_LOCATION (t, DECL_SOURCE_LOCATION (current_function_decl));
gimplify_to_stmt_list (&t);
mask_init_stmts = t;
......@@ -553,16 +552,18 @@ mf_build_check_statement_for (tree base, tree limit,
mf_limit = create_tmp_var (mf_uintptr_type, "__mf_limit");
/* Build: __mf_base = (uintptr_t) <base address expression>. */
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, mf_base,
convert (mf_uintptr_type, unshare_expr (base)));
t = build_gimple_modify_stmt (mf_base,
fold_convert (mf_uintptr_type,
unshare_expr (base)));
SET_EXPR_LOCUS (t, locus);
gimplify_to_stmt_list (&t);
head = tsi_start (t);
tsi = tsi_last (t);
/* Build: __mf_limit = (uintptr_t) <limit address expression>. */
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, mf_limit,
convert (mf_uintptr_type, unshare_expr (limit)));
t = build_gimple_modify_stmt (mf_limit,
fold_convert (mf_uintptr_type,
unshare_expr (limit)));
SET_EXPR_LOCUS (t, locus);
gimplify_to_stmt_list (&t);
tsi_link_after (&tsi, t, TSI_CONTINUE_LINKING);
......@@ -577,7 +578,7 @@ mf_build_check_statement_for (tree base, tree limit,
TREE_TYPE (TREE_TYPE (mf_cache_array_decl)),
mf_cache_array_decl, t, NULL_TREE, NULL_TREE);
t = build1 (ADDR_EXPR, mf_cache_structptr_type, t);
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, mf_elem, t);
t = build_gimple_modify_stmt (mf_elem, t);
SET_EXPR_LOCUS (t, locus);
gimplify_to_stmt_list (&t);
tsi_link_after (&tsi, t, TSI_CONTINUE_LINKING);
......@@ -623,7 +624,7 @@ mf_build_check_statement_for (tree base, tree limit,
can use as the condition for the conditional jump. */
t = build2 (TRUTH_OR_EXPR, boolean_type_node, t, u);
cond = create_tmp_var (boolean_type_node, "__mf_unlikely_cond");
t = build2 (GIMPLE_MODIFY_STMT, boolean_type_node, cond, t);
t = build_gimple_modify_stmt (cond, t);
gimplify_to_stmt_list (&t);
tsi_link_after (&tsi, t, TSI_CONTINUE_LINKING);
......@@ -669,12 +670,12 @@ mf_build_check_statement_for (tree base, tree limit,
if (! flag_mudflap_threads)
{
t = build2 (GIMPLE_MODIFY_STMT, void_type_node,
mf_cache_shift_decl_l, mf_cache_shift_decl);
t = build_gimple_modify_stmt (mf_cache_shift_decl_l,
mf_cache_shift_decl);
tsi_link_after (&tsi, t, TSI_CONTINUE_LINKING);
t = build2 (GIMPLE_MODIFY_STMT, void_type_node,
mf_cache_mask_decl_l, mf_cache_mask_decl);
t = build_gimple_modify_stmt (mf_cache_mask_decl_l,
mf_cache_mask_decl);
tsi_link_after (&tsi, t, TSI_CONTINUE_LINKING);
}
......
/* Nested function decomposition for trees.
Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of GCC.
......@@ -361,7 +361,7 @@ init_tmp_var (struct nesting_info *info, tree exp, tree_stmt_iterator *tsi)
tree t, stmt;
t = create_tmp_var_for (info, TREE_TYPE (exp), NULL);
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)));
tsi_link_before (tsi, stmt, TSI_SAME_STMT);
......@@ -389,7 +389,7 @@ save_tmp_var (struct nesting_info *info, tree exp,
tree t, stmt;
t = create_tmp_var_for (info, TREE_TYPE (exp), NULL);
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)));
tsi_link_after (tsi, stmt, TSI_SAME_STMT);
......@@ -1757,7 +1757,7 @@ finalize_nesting_tree_1 (struct nesting_info *root)
y = build3 (COMPONENT_REF, TREE_TYPE (field),
root->frame_decl, field, NULL_TREE);
x = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (field), y, x);
x = build_gimple_modify_stmt (y, x);
append_to_statement_list (x, &stmt_list);
}
}
......@@ -1768,7 +1768,7 @@ finalize_nesting_tree_1 (struct nesting_info *root)
{
tree x = build3 (COMPONENT_REF, TREE_TYPE (root->chain_field),
root->frame_decl, root->chain_field, NULL_TREE);
x = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (x), x, get_chain_decl (root));
x = build_gimple_modify_stmt (x, get_chain_decl (root));
append_to_statement_list (x, &stmt_list);
}
......
/* Convert a program in SSA form into Normal form.
Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Contributed by Andrew Macleod <amacleod@redhat.com>
This file is part of GCC.
......@@ -141,7 +141,7 @@ insert_copy_on_edge (edge e, tree dest, tree src)
{
tree copy;
copy = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (dest), dest, src);
copy = build_gimple_modify_stmt (dest, src);
set_is_used (dest);
if (TREE_CODE (src) == ADDR_EXPR)
......@@ -1254,8 +1254,8 @@ insert_backedge_copies (void)
/* Create a new instance of the underlying variable of the
PHI result. */
stmt = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (result_var),
NULL_TREE, PHI_ARG_DEF (phi, i));
stmt = build_gimple_modify_stmt (NULL_TREE,
PHI_ARG_DEF (phi, i));
name = make_ssa_name (result_var, stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = name;
......
/* Calculate branch probabilities, and basic block execution counts.
Copyright (C) 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Contributed by James E. Wilson, UC Berkeley/Cygnus Support;
based on some ideas from Dain Samples of UC Berkeley.
Further mangling by Bob Manson, Cygnus Support.
......@@ -171,11 +172,12 @@ tree_gen_edge_profiler (int edgeno, edge e)
tree tmp1 = create_tmp_var (gcov_type_node, "PROF");
tree tmp2 = create_tmp_var (gcov_type_node, "PROF");
tree ref = tree_coverage_counter_ref (GCOV_COUNTER_ARCS, edgeno);
tree stmt1 = build2 (GIMPLE_MODIFY_STMT, gcov_type_node, tmp1, ref);
tree stmt2 = build2 (GIMPLE_MODIFY_STMT, gcov_type_node, tmp2,
build2 (PLUS_EXPR, gcov_type_node,
tmp1, integer_one_node));
tree stmt3 = build2 (GIMPLE_MODIFY_STMT, gcov_type_node, ref, tmp2);
tree one = build_int_cst (gcov_type_node, 1);
tree stmt1 = build_gimple_modify_stmt (tmp1, ref);
tree stmt2 = build_gimple_modify_stmt (tmp2,
build2 (PLUS_EXPR, gcov_type_node,
tmp1, one));
tree stmt3 = build_gimple_modify_stmt (ref, tmp2);
bsi_insert_on_edge (e, stmt1);
bsi_insert_on_edge (e, stmt2);
bsi_insert_on_edge (e, stmt3);
......@@ -282,13 +284,9 @@ tree_gen_ic_profiler (histogram_value value, unsigned tag, unsigned base)
*/
tmp1 = create_tmp_var (ptr_void, "PROF");
stmt1 = build2 (GIMPLE_MODIFY_STMT,
build_pointer_type (get_gcov_type ()),
ic_gcov_type_ptr_var, ref_ptr);
stmt2 = build2 (GIMPLE_MODIFY_STMT, ptr_void, tmp1,
unshare_expr (value->hvalue.value));
stmt3 = build2 (GIMPLE_MODIFY_STMT, ptr_void,
ic_void_ptr_var, tmp1);
stmt1 = build_gimple_modify_stmt (ic_gcov_type_ptr_var, ref_ptr);
stmt2 = build_gimple_modify_stmt (tmp1, unshare_expr (value->hvalue.value));
stmt3 = build_gimple_modify_stmt (ic_void_ptr_var, tmp1);
bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT);
......
......@@ -2999,7 +2999,7 @@ scev_const_prop (void)
def = unshare_expr (def);
remove_phi_node (phi, NULL_TREE, false);
ass = build2 (GIMPLE_MODIFY_STMT, void_type_node, rslt, NULL_TREE);
ass = build_gimple_modify_stmt (rslt, NULL_TREE);
SSA_NAME_DEF_STMT (rslt) = ass;
{
block_stmt_iterator dest = bsi;
......
......@@ -1742,7 +1742,7 @@ sra_build_assignment (tree dst, tree src)
anyway, there's little point in making tests and/or adding
conversions to ensure the types of src and dst are the same.
So we just assume type differences at this point are ok. */
return build2 (GIMPLE_MODIFY_STMT, void_type_node, dst, src);
return build_gimple_modify_stmt (dst, src);
}
/* Generate a set of assignment statements in *LIST_P to copy all
......
......@@ -619,7 +619,7 @@ determine_invariantness_stmt (struct dom_walk_data *dw_data ATTRIBUTE_UNUSED,
&& outermost_invariant_loop_expr (rhs,
loop_containing_stmt (stmt)) == NULL)
{
tree lhs, stmt1, stmt2, var, name;
tree lhs, stmt1, stmt2, var, name, tmp;
lhs = GENERIC_TREE_OPERAND (stmt, 0);
......@@ -627,15 +627,15 @@ determine_invariantness_stmt (struct dom_walk_data *dw_data ATTRIBUTE_UNUSED,
var = create_tmp_var (TREE_TYPE (rhs), "reciptmp");
add_referenced_var (var);
stmt1 = build2 (GIMPLE_MODIFY_STMT, void_type_node, var,
build2 (RDIV_EXPR, TREE_TYPE (rhs),
build_real (TREE_TYPE (rhs), dconst1),
TREE_OPERAND (rhs, 1)));
tmp = build2 (RDIV_EXPR, TREE_TYPE (rhs),
build_real (TREE_TYPE (rhs), dconst1),
TREE_OPERAND (rhs, 1));
stmt1 = build_gimple_modify_stmt (var, tmp);
name = make_ssa_name (var, stmt1);
GIMPLE_STMT_OPERAND (stmt1, 0) = name;
stmt2 = build2 (GIMPLE_MODIFY_STMT, void_type_node, lhs,
build2 (MULT_EXPR, TREE_TYPE (rhs),
name, TREE_OPERAND (rhs, 0)));
tmp = build2 (MULT_EXPR, TREE_TYPE (rhs),
name, TREE_OPERAND (rhs, 0));
stmt2 = build_gimple_modify_stmt (lhs, tmp);
/* Replace division stmt with reciprocal and multiply stmts.
The multiply stmt is not invariant, so update iterator
......
/* Global, SSA-based optimizations using mathematical identities.
Copyright (C) 2005 Free Software Foundation, Inc.
Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of GCC.
......@@ -303,9 +303,10 @@ insert_reciprocals (block_stmt_iterator *def_bsi, struct occurrence *occ,
/* Make a variable with the replacement and substitute it. */
type = TREE_TYPE (def);
recip_def = make_rename_temp (type, "reciptmp");
new_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, recip_def,
fold_build2 (RDIV_EXPR, type, build_one_cst (type),
def));
new_stmt = build_gimple_modify_stmt (recip_def,
fold_build2 (RDIV_EXPR, type,
build_one_cst (type),
def));
if (occ->bb_has_division)
......@@ -607,7 +608,7 @@ execute_cse_sincos_1 (tree name)
return;
res = make_rename_temp (TREE_TYPE (TREE_TYPE (fndecl)), "sincostmp");
call = build_call_expr (fndecl, 1, name);
stmt = build2 (GIMPLE_MODIFY_STMT, NULL_TREE, res, call);
stmt = build_gimple_modify_stmt (res, call);
def_stmt = SSA_NAME_DEF_STMT (name);
if (bb_for_stmt (def_stmt) == top_bb
&& TREE_CODE (def_stmt) == GIMPLE_MODIFY_STMT)
......
/* Tail call optimization on trees.
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.
......@@ -560,8 +560,9 @@ adjust_accumulator_values (block_stmt_iterator bsi, tree m, tree a, edge back)
var = m_acc;
else
{
stmt = build2 (GIMPLE_MODIFY_STMT, ret_type, NULL_TREE,
build2 (MULT_EXPR, ret_type, m_acc, a));
stmt = build_gimple_modify_stmt (NULL_TREE,
build2 (MULT_EXPR, ret_type,
m_acc, a));
tmp = create_tmp_var (ret_type, "acc_tmp");
add_referenced_var (tmp);
......@@ -574,8 +575,8 @@ adjust_accumulator_values (block_stmt_iterator bsi, tree m, tree a, edge back)
else
var = a;
stmt = build2 (GIMPLE_MODIFY_STMT, ret_type, NULL_TREE,
build2 (PLUS_EXPR, ret_type, a_acc, var));
stmt = build_gimple_modify_stmt (NULL_TREE, build2 (PLUS_EXPR, ret_type,
a_acc, var));
var = make_ssa_name (SSA_NAME_VAR (a_acc), stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = var;
bsi_insert_after (&bsi, stmt, BSI_NEW_STMT);
......@@ -584,8 +585,9 @@ adjust_accumulator_values (block_stmt_iterator bsi, tree m, tree a, edge back)
if (m)
{
stmt = build2 (GIMPLE_MODIFY_STMT, ret_type, NULL_TREE,
build2 (MULT_EXPR, ret_type, m_acc, m));
stmt = build_gimple_modify_stmt (NULL_TREE,
build2 (MULT_EXPR, ret_type,
m_acc, m));
var = make_ssa_name (SSA_NAME_VAR (m_acc), stmt);
GIMPLE_STMT_OPERAND (stmt, 0) = var;
bsi_insert_after (&bsi, stmt, BSI_NEW_STMT);
......@@ -638,8 +640,9 @@ adjust_return_value (basic_block bb, tree m, tree a)
if (m)
{
stmt = build2 (GIMPLE_MODIFY_STMT, ret_type, NULL_TREE,
build2 (MULT_EXPR, ret_type, m_acc, ret_var));
stmt = build_gimple_modify_stmt (NULL_TREE,
build2 (MULT_EXPR, ret_type,
m_acc, ret_var));
tmp = create_tmp_var (ret_type, "acc_tmp");
add_referenced_var (tmp);
......@@ -653,8 +656,9 @@ adjust_return_value (basic_block bb, tree m, tree a)
if (a)
{
stmt = build2 (GIMPLE_MODIFY_STMT, ret_type, NULL_TREE,
build2 (PLUS_EXPR, ret_type, a_acc, var));
stmt = build_gimple_modify_stmt (NULL_TREE,
build2 (PLUS_EXPR, ret_type,
a_acc, var));
tmp = create_tmp_var (ret_type, "acc_tmp");
add_referenced_var (tmp);
......
/* Analysis Utilities for Loop Vectorization.
Copyright (C) 2006 Free Software Foundation, Inc.
Copyright (C) 2006, 2007 Free Software Foundation, Inc.
Contributed by Dorit Nuzman <dorit@il.ibm.com>
This file is part of GCC.
......@@ -674,8 +674,7 @@ vect_pattern_recog_1 (
var = create_tmp_var (pattern_type, "patt");
add_referenced_var (var);
var_name = make_ssa_name (var, NULL_TREE);
pattern_expr = build2 (GIMPLE_MODIFY_STMT, void_type_node, var_name,
pattern_expr);
pattern_expr = build_gimple_modify_stmt (var_name, pattern_expr);
SSA_NAME_DEF_STMT (var_name) = pattern_expr;
bsi_insert_before (&si, pattern_expr, BSI_SAME_STMT);
ann = stmt_ann (pattern_expr);
......
......@@ -2993,22 +2993,20 @@ build_assert_expr_for (tree cond, tree v)
if (COMPARISON_CLASS_P (cond))
{
tree a = build2 (ASSERT_EXPR, TREE_TYPE (v), v, cond);
assertion = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (v), n, a);
assertion = build_gimple_modify_stmt (n, a);
}
else if (TREE_CODE (cond) == TRUTH_NOT_EXPR)
{
/* Given !V, build the assignment N = false. */
tree op0 = TREE_OPERAND (cond, 0);
gcc_assert (op0 == v);
assertion = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (v), n,
boolean_false_node);
assertion = build_gimple_modify_stmt (n, boolean_false_node);
}
else if (TREE_CODE (cond) == SSA_NAME)
{
/* Given V, build the assignment N = true. */
gcc_assert (v == cond);
assertion = build2 (GIMPLE_MODIFY_STMT,
TREE_TYPE (v), n, boolean_true_node);
assertion = build_gimple_modify_stmt (n, boolean_true_node);
}
else
gcc_unreachable ();
......
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