OSDN Git Service

* tree-eh.c (do_return_redirection): Call build_gimple_modify_stmt
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Mar 2007 19:02:51 +0000 (19:02 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Mar 2007 19:02:51 +0000 (19:02 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122707 138bc75d-0d04-0410-961f-82ee72b054a4

16 files changed:
gcc/ChangeLog
gcc/tree-eh.c
gcc/tree-if-conv.c
gcc/tree-inline.c
gcc/tree-mudflap.c
gcc/tree-nested.c
gcc/tree-outof-ssa.c
gcc/tree-profile.c
gcc/tree-scalar-evolution.c
gcc/tree-sra.c
gcc/tree-ssa-loop-im.c
gcc/tree-ssa-math-opts.c
gcc/tree-tailcall.c
gcc/tree-vect-patterns.c
gcc/tree-vect-transform.c
gcc/tree-vrp.c

index 5b19aa3..75b37e4 100644 (file)
@@ -1,3 +1,40 @@
+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".
index bb276fb..edd17cb 100644 (file)
@@ -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;
        }
index e97824f..7d1a838 100644 (file)
@@ -1,5 +1,5 @@
 /* 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.  */
index 349d109..966da84 100644 (file)
@@ -1,5 +1,6 @@
 /* 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
index e6b6468..698114e 100644 (file)
@@ -1,5 +1,6 @@
 /* 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);
     }
 
index 0713773..f26c9ba 100644 (file)
@@ -1,5 +1,5 @@
 /* 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);
     }
 
index ad8c5ae..7e759ba 100644 (file)
@@ -1,5 +1,5 @@
 /* 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;
 
index b8e54d4..54e8847 100644 (file)
@@ -1,6 +1,7 @@
 /* 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);
index 9b0df6f..f1914c3 100644 (file)
@@ -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;
index 9cf2cef..7db39c4 100644 (file)
@@ -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
index 316c3d2..49741da 100644 (file)
@@ -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
index 1861f3e..0bb999c 100644 (file)
@@ -1,5 +1,5 @@
 /* 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)
index 7889cbb..fa63637 100644 (file)
@@ -1,5 +1,5 @@
 /* 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);
index 3074195..63255bd 100644 (file)
@@ -1,5 +1,5 @@
 /* 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);
index 4a63a3c..6938841 100644 (file)
@@ -1,5 +1,5 @@
 /* Transformation Utilities for Loop Vectorization.
-   Copyright (C) 2003,2004,2005,2006 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
    Contributed by Dorit Naishlos <dorit@il.ibm.com>
 
 This file is part of GCC.
@@ -323,7 +323,7 @@ vect_create_data_ref_ptr (tree stmt,
 
   /* Create: p = (vectype *) initial_base  */
   vec_stmt = fold_convert (vect_ptr_type, new_temp);
-  vec_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, vect_ptr, vec_stmt);
+  vec_stmt = build_gimple_modify_stmt (vect_ptr, vec_stmt);
   vect_ptr_init = make_ssa_name (vect_ptr, vec_stmt);
   GIMPLE_STMT_OPERAND (vec_stmt, 0) = vect_ptr_init;
   new_bb = bsi_insert_on_edge_immediate (pe, vec_stmt);
@@ -416,8 +416,9 @@ bump_vector_ptr (tree dataref_ptr, tree ptr_incr, block_stmt_iterator *bsi,
   use_operand_p use_p;
   tree new_dataref_ptr;
 
-  incr_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, ptr_var,
-                build2 (PLUS_EXPR, vptr_type, dataref_ptr, update));
+  incr_stmt = build_gimple_modify_stmt (ptr_var,
+                                       build2 (PLUS_EXPR, vptr_type,
+                                               dataref_ptr, update));
   new_dataref_ptr = make_ssa_name (ptr_var, incr_stmt);
   GIMPLE_STMT_OPERAND (incr_stmt, 0) = new_dataref_ptr;
   vect_finish_stmt_generation (stmt, incr_stmt, bsi);
@@ -491,7 +492,7 @@ vect_init_vector (tree stmt, tree vector_var, tree vector_type)
   new_var = vect_get_new_vect_var (vector_type, vect_simple_var, "cst_");
   add_referenced_var (new_var); 
  
-  init_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, new_var, vector_var);
+  init_stmt = build_gimple_modify_stmt (new_var, vector_var);
   new_temp = make_ssa_name (new_var, init_stmt);
   GIMPLE_STMT_OPERAND (init_stmt, 0) = new_temp;
 
@@ -579,11 +580,13 @@ get_initial_def_for_induction (tree stmt, tree iv_phi)
   t = tree_cons (NULL_TREE, init_expr, t);
   for (i = 1; i < nunits; i++)
     {
+      tree tmp;
+
       /* Create: new_name = new_name + step_expr  */
       new_var = vect_get_new_vect_var (scalar_type, vect_scalar_var, "var_");
       add_referenced_var (new_var);
-      init_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, new_var,
-                          fold_build2 (PLUS_EXPR, scalar_type, new_name, step_expr));
+      tmp = fold_build2 (PLUS_EXPR, scalar_type, new_name, step_expr);
+      init_stmt = build_gimple_modify_stmt (new_var, tmp);
       new_name = make_ssa_name (new_var, init_stmt);
       GIMPLE_STMT_OPERAND (init_stmt, 0) = new_name;
 
@@ -631,8 +634,9 @@ get_initial_def_for_induction (tree stmt, tree iv_phi)
   induc_def = PHI_RESULT (induction_phi);
 
   /* Create the iv update inside the loop  */
-  new_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, NULL_TREE,
-                     build2 (PLUS_EXPR, vectype, induc_def, vec_step));
+  new_stmt = build_gimple_modify_stmt (NULL_TREE,
+                                      build2 (PLUS_EXPR, vectype,
+                                              induc_def, vec_step));
   vec_def = make_ssa_name (vec_dest, new_stmt);
   GIMPLE_STMT_OPERAND (new_stmt, 0) = vec_def;
   bsi = bsi_for_stmt (stmt);
@@ -666,10 +670,11 @@ get_initial_def_for_induction (tree stmt, tree iv_phi)
       prev_stmt_vinfo = vinfo_for_stmt (induction_phi);
       for (i = 1; i < ncopies; i++)
        {
+         tree tmp;
+
          /* vec_i = vec_prev + vec_{step*nunits}  */
-                        
-         new_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, NULL_TREE,
-                       build2 (PLUS_EXPR, vectype, vec_def, vec_step));
+         tmp = build2 (PLUS_EXPR, vectype, vec_def, vec_step);
+         new_stmt = build_gimple_modify_stmt (NULL_TREE, tmp);
          vec_def = make_ssa_name (vec_dest, new_stmt);
          GIMPLE_STMT_OPERAND (new_stmt, 0) = vec_def;
          bsi = bsi_for_stmt (stmt);
@@ -1237,6 +1242,8 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt,
 
   if (reduc_code < NUM_TREE_CODES)
     {
+      tree tmp;
+
       /*** Case 1:  Create:
           v_out2 = reduc_expr <v_out1>  */
 
@@ -1244,8 +1251,8 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt,
        fprintf (vect_dump, "Reduce using direct vector reduction.");
 
       vec_dest = vect_create_destination_var (scalar_dest, vectype);
-      epilog_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, vec_dest,
-                       build1 (reduc_code, vectype,  PHI_RESULT (new_phi)));
+      tmp = build1 (reduc_code, vectype,  PHI_RESULT (new_phi));
+      epilog_stmt = build_gimple_modify_stmt (vec_dest, tmp);
       new_temp = make_ssa_name (vec_dest, epilog_stmt);
       GIMPLE_STMT_OPERAND (epilog_stmt, 0) = new_temp;
       bsi_insert_after (&exit_bsi, epilog_stmt, BSI_NEW_STMT);
@@ -1301,19 +1308,14 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt,
               bit_offset /= 2)
            {
              tree bitpos = size_int (bit_offset);
-
-             epilog_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node,
-                                   vec_dest,
-                                   build2 (shift_code, vectype,
-                                           new_temp, bitpos));
+             tree tmp = build2 (shift_code, vectype, new_temp, bitpos);
+             epilog_stmt = build_gimple_modify_stmt (vec_dest, tmp);
              new_name = make_ssa_name (vec_dest, epilog_stmt);
              GIMPLE_STMT_OPERAND (epilog_stmt, 0) = new_name;
              bsi_insert_after (&exit_bsi, epilog_stmt, BSI_NEW_STMT);
 
-             epilog_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node,
-                                   vec_dest,
-                                   build2 (code, vectype,
-                                           new_name, new_temp));
+             tmp = build2 (code, vectype, new_name, new_temp);
+             epilog_stmt = build_gimple_modify_stmt (vec_dest, tmp);
              new_temp = make_ssa_name (vec_dest, epilog_stmt);
              GIMPLE_STMT_OPERAND (epilog_stmt, 0) = new_temp;
              bsi_insert_after (&exit_bsi, epilog_stmt, BSI_NEW_STMT);
@@ -1343,8 +1345,7 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt,
          rhs = build3 (BIT_FIELD_REF, scalar_type, vec_temp, bitsize,
                         bitsize_zero_node);
          BIT_FIELD_REF_UNSIGNED (rhs) = TYPE_UNSIGNED (scalar_type);
-         epilog_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node,
-                               new_scalar_dest, rhs);
+         epilog_stmt = build_gimple_modify_stmt (new_scalar_dest, rhs);
          new_temp = make_ssa_name (new_scalar_dest, epilog_stmt);
          GIMPLE_STMT_OPERAND (epilog_stmt, 0) = new_temp;
          bsi_insert_after (&exit_bsi, epilog_stmt, BSI_NEW_STMT);
@@ -1353,20 +1354,19 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt,
               bit_offset < vec_size_in_bits;
               bit_offset += element_bitsize)
            { 
+             tree tmp;
              tree bitpos = bitsize_int (bit_offset);
              tree rhs = build3 (BIT_FIELD_REF, scalar_type, vec_temp, bitsize,
                                 bitpos);
                
              BIT_FIELD_REF_UNSIGNED (rhs) = TYPE_UNSIGNED (scalar_type);
-             epilog_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node,
-                                   new_scalar_dest, rhs);      
+             epilog_stmt = build_gimple_modify_stmt (new_scalar_dest, rhs);    
              new_name = make_ssa_name (new_scalar_dest, epilog_stmt);
              GIMPLE_STMT_OPERAND (epilog_stmt, 0) = new_name;
              bsi_insert_after (&exit_bsi, epilog_stmt, BSI_NEW_STMT);
 
-             epilog_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node,
-                               new_scalar_dest,
-                               build2 (code, scalar_type, new_name, new_temp));
+             tmp = build2 (code, scalar_type, new_name, new_temp);
+             epilog_stmt = build_gimple_modify_stmt (new_scalar_dest, tmp);
              new_temp = make_ssa_name (new_scalar_dest, epilog_stmt);
              GIMPLE_STMT_OPERAND (epilog_stmt, 0) = new_temp;
              bsi_insert_after (&exit_bsi, epilog_stmt, BSI_NEW_STMT);
@@ -1395,8 +1395,7 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt,
 
       rhs = build3 (BIT_FIELD_REF, scalar_type, new_temp, bitsize, bitpos);
       BIT_FIELD_REF_UNSIGNED (rhs) = TYPE_UNSIGNED (scalar_type);
-      epilog_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node,
-                           new_scalar_dest, rhs);
+      epilog_stmt = build_gimple_modify_stmt (new_scalar_dest, rhs);
       new_temp = make_ssa_name (new_scalar_dest, epilog_stmt);
       GIMPLE_STMT_OPERAND (epilog_stmt, 0) = new_temp; 
       bsi_insert_after (&exit_bsi, epilog_stmt, BSI_NEW_STMT);
@@ -1411,9 +1410,8 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt,
   
   if (scalar_initial_def)
     {
-      epilog_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node,
-                     new_scalar_dest,
-                      build2 (code, scalar_type, new_temp, scalar_initial_def));
+      tree tmp = build2 (code, scalar_type, new_temp, scalar_initial_def);
+      epilog_stmt = build_gimple_modify_stmt (new_scalar_dest, tmp);
       new_temp = make_ssa_name (new_scalar_dest, epilog_stmt);
       GIMPLE_STMT_OPERAND (epilog_stmt, 0) = new_temp;
       bsi_insert_after (&exit_bsi, epilog_stmt, BSI_NEW_STMT);
@@ -1745,7 +1743,7 @@ vectorizable_reduction (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
       else
         expr = build3 (code, vectype, loop_vec_def0, loop_vec_def1, 
                                                                reduc_def);
-      new_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, vec_dest, expr);
+      new_stmt = build_gimple_modify_stmt (vec_dest, expr);
       new_temp = make_ssa_name (vec_dest, new_stmt);
       GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
       vect_finish_stmt_generation (stmt, new_stmt, bsi);
@@ -1928,7 +1926,7 @@ vectorizable_call (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
       vargs = nreverse (vargs);
 
       rhs = build_function_call_expr (fndecl, vargs);
-      new_stmt = build2 (GIMPLE_MODIFY_STMT, NULL_TREE, vec_dest, rhs);
+      new_stmt = build_gimple_modify_stmt (vec_dest, rhs);
       new_temp = make_ssa_name (vec_dest, new_stmt);
       GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
 
@@ -2080,8 +2078,7 @@ vectorizable_conversion (tree stmt, block_stmt_iterator * bsi,
       new_stmt = build_call_expr (builtin_decl, 1, vec_oprnd0);
 
       /* Arguments are ready. create the new vector stmt.  */
-      new_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, vec_dest,
-                        new_stmt);
+      new_stmt = build_gimple_modify_stmt (vec_dest, new_stmt);
       new_temp = make_ssa_name (vec_dest, new_stmt);
       GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
       vect_finish_stmt_generation (stmt, new_stmt, bsi);
@@ -2168,7 +2165,7 @@ vectorizable_assignment (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
   vec_oprnd = vect_get_vec_def_for_operand (op, stmt, NULL);
 
   /* Arguments are ready. create the new vector stmt.  */
-  *vec_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, vec_dest, vec_oprnd);
+  *vec_stmt = build_gimple_modify_stmt (vec_dest, vec_oprnd);
   new_temp = make_ssa_name (vec_dest, *vec_stmt);
   GIMPLE_STMT_OPERAND (*vec_stmt, 0) = new_temp;
   vect_finish_stmt_generation (stmt, *vec_stmt, bsi);
@@ -2453,10 +2450,10 @@ vectorizable_operation (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
       /* Arguments are ready. create the new vector stmt.  */
                                                                                 
       if (op_type == binary_op)
-        new_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, vec_dest,
+        new_stmt = build_gimple_modify_stmt (vec_dest,
                     build2 (code, vectype, vec_oprnd0, vec_oprnd1));
       else
-        new_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, vec_dest,
+        new_stmt = build_gimple_modify_stmt (vec_dest,
                     build1 (code, vectype, vec_oprnd0));
       new_temp = make_ssa_name (vec_dest, new_stmt);
       GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
@@ -2609,7 +2606,7 @@ vectorizable_type_demotion (tree stmt, block_stmt_iterator *bsi,
                                                                                 
       /* Arguments are ready. Create the new vector stmt.  */
       expr = build2 (code, vectype_out, vec_oprnd0, vec_oprnd1);
-      new_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, vec_dest, expr);
+      new_stmt = build_gimple_modify_stmt (vec_dest, expr);
       new_temp = make_ssa_name (vec_dest, new_stmt);
       GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
       vect_finish_stmt_generation (stmt, new_stmt, bsi);
@@ -2666,7 +2663,7 @@ vect_gen_widened_results_half (enum tree_code code, tree vectype, tree decl,
       else  
         expr = build1 (code, vectype, vec_oprnd0); 
     } 
-  new_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, vec_dest, expr);
+  new_stmt = build_gimple_modify_stmt (vec_dest, expr);
   new_temp = make_ssa_name (vec_dest, new_stmt); 
   GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp; 
   vect_finish_stmt_generation (stmt, new_stmt, bsi); 
@@ -2958,7 +2955,7 @@ vect_permute_store_chain (VEC(tree,heap) *dr_chain,
 {
   tree perm_dest, perm_stmt, vect1, vect2, high, low;
   tree vectype = STMT_VINFO_VECTYPE (vinfo_for_stmt (stmt));
-  tree scalar_dest;
+  tree scalar_dest, tmp;
   int i;
   unsigned int j;
   VEC(tree,heap) *first, *second;
@@ -2989,13 +2986,10 @@ vect_permute_store_chain (VEC(tree,heap) *dr_chain,
          DECL_GIMPLE_REG_P (perm_dest) = 1;
          add_referenced_var (perm_dest);
           if (BYTES_BIG_ENDIAN)
-           perm_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, perm_dest,
-                               build2 (VEC_INTERLEAVE_HIGH_EXPR, vectype, 
-                                        vect1, vect2)); 
+           tmp = build2 (VEC_INTERLEAVE_HIGH_EXPR, vectype, vect1, vect2); 
          else
-            perm_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, perm_dest,
-                                build2 (VEC_INTERLEAVE_LOW_EXPR, vectype, 
-                                        vect1, vect2));
+           tmp = build2 (VEC_INTERLEAVE_LOW_EXPR, vectype, vect1, vect2);
+         perm_stmt = build_gimple_modify_stmt (perm_dest, tmp);
          high = make_ssa_name (perm_dest, perm_stmt);
          GIMPLE_STMT_OPERAND (perm_stmt, 0) = high;
          vect_finish_stmt_generation (stmt, perm_stmt, bsi);
@@ -3010,13 +3004,10 @@ vect_permute_store_chain (VEC(tree,heap) *dr_chain,
          DECL_GIMPLE_REG_P (perm_dest) = 1;
          add_referenced_var (perm_dest);
          if (BYTES_BIG_ENDIAN)
-           perm_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, perm_dest,
-                               build2 (VEC_INTERLEAVE_LOW_EXPR, vectype, 
-                                       vect1, vect2));
+           tmp = build2 (VEC_INTERLEAVE_LOW_EXPR, vectype, vect1, vect2);
          else
-            perm_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, perm_dest,
-                                build2 (VEC_INTERLEAVE_HIGH_EXPR, vectype, 
-                                        vect1, vect2));
+           tmp = build2 (VEC_INTERLEAVE_HIGH_EXPR, vectype, vect1, vect2);
+         perm_stmt = build_gimple_modify_stmt (perm_dest, tmp);
          low = make_ssa_name (perm_dest, perm_stmt);
          GIMPLE_STMT_OPERAND (perm_stmt, 0) = low;
          vect_finish_stmt_generation (stmt, perm_stmt, bsi);
@@ -3252,8 +3243,7 @@ vectorizable_store (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
 
          data_ref = build_fold_indirect_ref (dataref_ptr);
          /* Arguments are ready. Create the new vector stmt.  */
-         new_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, data_ref, 
-                            vec_oprnd);
+         new_stmt = build_gimple_modify_stmt (data_ref, vec_oprnd);
          vect_finish_stmt_generation (stmt, new_stmt, bsi);
 
          /* Set the VDEFs for the vector pointer. If this virtual def
@@ -3364,7 +3354,7 @@ vect_setup_realignment (tree stmt, block_stmt_iterator *bsi,
   ptr = vect_create_data_ref_ptr (stmt, bsi, NULL_TREE, &init_addr, &inc, true,
                                  NULL_TREE);
   data_ref = build1 (ALIGN_INDIRECT_REF, vectype, ptr);
-  new_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, vec_dest, data_ref);
+  new_stmt = build_gimple_modify_stmt (vec_dest, data_ref);
   new_temp = make_ssa_name (vec_dest, new_stmt);
   GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
   new_bb = bsi_insert_on_edge_immediate (pe, new_stmt);
@@ -3382,8 +3372,7 @@ vect_setup_realignment (tree stmt, block_stmt_iterator *bsi,
       new_stmt = build_call_expr (builtin_decl, 1, init_addr);
       vec_dest = vect_create_destination_var (scalar_dest, 
                                              TREE_TYPE (new_stmt));
-      new_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, vec_dest,
-                        new_stmt);
+      new_stmt = build_gimple_modify_stmt (vec_dest, new_stmt);
       new_temp = make_ssa_name (vec_dest, new_stmt);
       GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
       new_bb = bsi_insert_on_edge_immediate (pe, new_stmt);
@@ -3540,6 +3529,7 @@ vect_permute_load_chain (VEC(tree,heap) *dr_chain,
 {
   tree perm_dest, perm_stmt, data_ref, first_vect, second_vect;
   tree vectype = STMT_VINFO_VECTYPE (vinfo_for_stmt (stmt));
+  tree tmp;
   int i;
   unsigned int j;
 
@@ -3559,10 +3549,10 @@ vect_permute_load_chain (VEC(tree,heap) *dr_chain,
          perm_dest = create_tmp_var (vectype, "vect_perm_even");
          DECL_GIMPLE_REG_P (perm_dest) = 1;
          add_referenced_var (perm_dest);
-        
-         perm_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, perm_dest,
-                             build2 (VEC_EXTRACT_EVEN_EXPR, vectype, 
-                                     first_vect, second_vect));
+
+         tmp = build2 (VEC_EXTRACT_EVEN_EXPR, vectype,
+                       first_vect, second_vect);
+         perm_stmt = build_gimple_modify_stmt (perm_dest, tmp);
 
          data_ref = make_ssa_name (perm_dest, perm_stmt);
          GIMPLE_STMT_OPERAND (perm_stmt, 0) = data_ref;
@@ -3576,9 +3566,9 @@ vect_permute_load_chain (VEC(tree,heap) *dr_chain,
          DECL_GIMPLE_REG_P (perm_dest) = 1;
          add_referenced_var (perm_dest);
 
-         perm_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, perm_dest,
-                             build2 (VEC_EXTRACT_ODD_EXPR, vectype, 
-                                     first_vect, second_vect));
+         tmp = build2 (VEC_EXTRACT_ODD_EXPR, vectype, 
+                       first_vect, second_vect);
+         perm_stmt = build_gimple_modify_stmt (perm_dest, tmp);
          data_ref = make_ssa_name (perm_dest, perm_stmt);
          GIMPLE_STMT_OPERAND (perm_stmt, 0) = data_ref;
          vect_finish_stmt_generation (stmt, perm_stmt, bsi);
@@ -3940,8 +3930,7 @@ vectorizable_load (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
              gcc_unreachable ();
            }
          vec_dest = vect_create_destination_var (scalar_dest, vectype);
-         new_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, vec_dest,
-                            data_ref);
+         new_stmt = build_gimple_modify_stmt (vec_dest, data_ref);
          new_temp = make_ssa_name (vec_dest, new_stmt);
          GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
          vect_finish_stmt_generation (stmt, new_stmt, bsi);
@@ -3959,8 +3948,7 @@ vectorizable_load (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
              vec_dest = vect_create_destination_var (scalar_dest, vectype);
              new_stmt =
                build3 (REALIGN_LOAD_EXPR, vectype, msq, lsq, realignment_token);
-             new_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, vec_dest,
-                                new_stmt);
+             new_stmt = build_gimple_modify_stmt (vec_dest, new_stmt);
              new_temp = make_ssa_name (vec_dest, new_stmt);
              GIMPLE_STMT_OPERAND (new_stmt, 0) = new_temp;
              vect_finish_stmt_generation (stmt, new_stmt, bsi);
@@ -4208,8 +4196,7 @@ vectorizable_condition (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
   vec_cond_expr = build3 (VEC_COND_EXPR, vectype, 
                          vec_compare, vec_then_clause, vec_else_clause);
 
-  *vec_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node, vec_dest,
-                     vec_cond_expr);
+  *vec_stmt = build_gimple_modify_stmt (vec_dest, vec_cond_expr);
   new_temp = make_ssa_name (vec_dest, *vec_stmt);
   GIMPLE_STMT_OPERAND (*vec_stmt, 0) = new_temp;
   vect_finish_stmt_generation (stmt, *vec_stmt, bsi);
@@ -4953,7 +4940,7 @@ vect_create_cond_for_align_checks (loop_vec_info loop_vinfo,
 {
   VEC(tree,heap) *may_misalign_stmts
     = LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo);
-  tree ref_stmt;
+  tree ref_stmt, tmp;
   int mask = LOOP_VINFO_PTR_MASK (loop_vinfo);
   tree mask_cst;
   unsigned int i;
@@ -4997,8 +4984,7 @@ vect_create_cond_for_align_checks (loop_vec_info loop_vinfo,
       add_referenced_var (addr_tmp);
       addr_tmp_name = make_ssa_name (addr_tmp, NULL_TREE);
       addr_stmt = fold_convert (int_ptrsize_type, addr_base);
-      addr_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node,
-                          addr_tmp_name, addr_stmt);
+      addr_stmt = build_gimple_modify_stmt (addr_tmp_name, addr_stmt);
       SSA_NAME_DEF_STMT (addr_tmp_name) = addr_stmt;
       append_to_statement_list_force (addr_stmt, cond_expr_stmt_list);
 
@@ -5011,11 +4997,9 @@ vect_create_cond_for_align_checks (loop_vec_info loop_vinfo,
           or_tmp = create_tmp_var (int_ptrsize_type, tmp_name);
           add_referenced_var (or_tmp);
           new_or_tmp_name = make_ssa_name (or_tmp, NULL_TREE);
-          or_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node,
-                           new_or_tmp_name,
-                            build2 (BIT_IOR_EXPR, int_ptrsize_type,
-                                   or_tmp_name,
-                                    addr_tmp_name));
+         tmp = build2 (BIT_IOR_EXPR, int_ptrsize_type,
+                       or_tmp_name, addr_tmp_name);
+          or_stmt = build_gimple_modify_stmt (new_or_tmp_name, tmp);
           SSA_NAME_DEF_STMT (new_or_tmp_name) = or_stmt;
           append_to_statement_list_force (or_stmt, cond_expr_stmt_list);
           or_tmp_name = new_or_tmp_name;
@@ -5032,10 +5016,8 @@ vect_create_cond_for_align_checks (loop_vec_info loop_vinfo,
   add_referenced_var (and_tmp);
   and_tmp_name = make_ssa_name (and_tmp, NULL_TREE);
 
-  and_stmt = build2 (GIMPLE_MODIFY_STMT, void_type_node,
-                     and_tmp_name,
-                     build2 (BIT_AND_EXPR, int_ptrsize_type,
-                             or_tmp_name, mask_cst));
+  tmp = build2 (BIT_AND_EXPR, int_ptrsize_type, or_tmp_name, mask_cst);
+  and_stmt = build_gimple_modify_stmt (and_tmp_name, tmp);
   SSA_NAME_DEF_STMT (and_tmp_name) = and_stmt;
   append_to_statement_list_force (and_stmt, cond_expr_stmt_list);
 
index 0e0e327..74f63e2 100644 (file)
@@ -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 ();