On November 28, 2014 8:02:23 PM CET, Jakub Jelinek <ja...@redhat.com> wrote:
>Hi!
>
>As the following patch shows, , NULL) is passed to these 5 functions
>way too often that forcing everybody to spell it everywhere seems to
>verbose, leading to formatting issues and making code less readable.
>
>Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

Ok.

>As possible follow-up, I wonder if gimple_build_assign_with_ops
>isn't too long and too verbose either, couldn't we just
>use overloads of gimple_build_assign instead?

Sure.

>Either with the argument order of gimple_build_assign_with_ops,
>i.e. tree_code, lhs, operands... , or perhaps swap the lhs and
>tree_code, so lhs, tree_code, operands... In either case, I'd
>find it to be pretty much unambiguous with the current two operand
>gimple_build_assign which takes lhs, treeop, the presence of
>enum tree_code would make it obvious that you are supplying ops for it
>rather than building it from what is extracted from the tree.
>Thoughts on that?

Swapping tree_code and lhs makes sense I think.

Richard.

>
>2014-11-28  Jakub Jelinek  <ja...@redhat.com>
>
>       * gimple-expr.h (create_tmp_var_raw, create_tmp_var,
>       create_tmp_reg): Add default NULL value to last argument.
>       * tree-ssanames.h (make_ssa_name, copy_ssa_name): Likewise.
>       * gimple-low.c (lower_builtin_posix_memalign): Remove NULL
>       last argument from create_tmp_var_raw, create_tmp_var,
>       create_tmp_reg, make_ssa_name and copy_ssa_name calls.
>       * tree-ssa-strlen.c (get_string_length): Likewise.
>       * tree-emutls.c (gen_emutls_addr, lower_emutls_1): Likewise.
>       * tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
>       * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
>       * ipa-prop.c (ipa_modify_call_arguments): Likewise.
>       * tree-ssa-forwprop.c (simplify_rotate): Likewise.
>       * tree-ssa-ccp.c (fold_builtin_alloca_with_align): Likewise.
>       * asan.c (build_shadow_mem_access, maybe_create_ssa_name,
>       maybe_cast_to_ptrmode, asan_expand_check_ifn): Likewise.
>       * tsan.c (instrument_expr, instrument_builtin_call,
>       instrument_func_entry): Likewise.
>       * varpool.c (add_new_static_var): Likewise.
>       * tree-loop-distribution.c (generate_memset_builtin): Likewise.
>       * gimplify.c (internal_get_tmp_var, gimplify_return_expr,
>       gimplify_modify_expr_to_memcpy, gimplify_modify_expr_to_memset,
>       gimplify_init_ctor_eval_range, gimplify_init_constructor,
>       gimplify_omp_atomic, gimplify_expr): Likewise.
>       * gimple-builder.c (build_assign, build_type_cast): Likewise.
>       * tree-vect-loop-manip.c (slpeel_update_phi_nodes_for_guard1,
>       slpeel_update_phi_nodes_for_guard2, slpeel_tree_peel_loop_to_edge,
>       vect_loop_versioning): Likewise.
>       * tree-if-conv.c (version_loop_for_if_conversion): Likewise.
>       * gimple-match-head.c (maybe_push_res_to_seq): Likewise.
>       * tree-vect-patterns.c (vect_handle_widen_op_by_const,
>       vect_recog_widen_mult_pattern, vect_operation_fits_smaller_type,
>       vect_recog_over_widening_pattern): Likewise.
>       * tree-sra.c (build_ref_for_offset, create_access_replacement):
>       Likewise.
>       * tree-cfg.c (make_blocks): Likewise.
>       * tree-eh.c (lower_eh_constructs_2, lower_resx, lower_eh_dispatch):
>       Likewise.
>       * tree-ssa-propagate.c (update_call_from_tree): Likewise.
>       * tree-complex.c (get_component_ssa_name, expand_complex_div_wide):
>       Likewise.
>       * tree-ssa-math-opts.c (build_and_insert_cast): Likewise.
>       * tree-tailcall.c (update_accumulator_with_ops): Likewise.
>       * tree-predcom.c (initialize_root_vars, initialize_root_vars_lm,
>       execute_load_motion, reassociate_to_the_same_stmt): Likewise.
>       * tree-ssa-reassoc.c (build_and_add_sum,
>       optimize_range_tests_to_bit_test, update_ops,
>       maybe_optimize_range_tests, rewrite_expr_tree, linearize_expr,
>       negate_value, repropagate_negates): Likewise.
>       * tree-vect-loop.c (vect_is_simple_reduction_1,
>       vect_create_epilog_for_reduction): Likewise.
>       * ipa-split.c (split_function): Likewise.
>       * tree-inline.c (remap_ssa_name, setup_one_parameter,
>       declare_return_variable, tree_function_versioning): Likewise.
>       * tree-cfgcleanup.c (fixup_noreturn_call): Likewise.
>       * cfgexpand.c (update_alias_info_with_stack_vars, expand_used_vars):
>       Likewise.
>       * tree-ssa-phiopt.c (conditional_replacement, abs_replacement,
>       neg_replacement): Likewise.
>       * gimplify-me.c (force_gimple_operand_1, gimple_regimplify_operands):
>       Likewise.
>       * tree-vrp.c (simplify_truth_ops_using_ranges,
>       simplify_float_conversion_using_ranges,
>       simplify_internal_call_using_ranges): Likewise.
>       * tree-switch-conversion.c (emit_case_bit_tests,
>       build_one_array, build_arrays, gen_def_assigns): Likewise.
>       * gimple-fold.c (gimple_fold_builtin_memory_op,
>       gimple_fold_builtin_strcat, gimple_fold_call, gimple_build): Likewise.
>       * tree-vect-generic.c (expand_vector_divmod,
>       optimize_vector_constructor): Likewise.
>       * ubsan.c (ubsan_encode_value, ubsan_expand_null_ifn,
>       ubsan_expand_objsize_ifn, instrument_si_overflow,
>       instrument_bool_enum_load, instrument_nonnull_arg): Likewise.
>       * tree-outof-ssa.c (insert_backedge_copies): Likewise.
>       * tree-ssa-loop-manip.c (create_iv,
>       tree_transform_and_unroll_loop): Likewise.
>       * omp-low.c (scan_omp_parallel, lower_rec_simd_input_clauses,
>       lower_rec_input_clauses, lower_lastprivate_clauses,
>       expand_parallel_call, expand_omp_for_static_chunk,
>       expand_omp_atomic_pipeline, expand_omp_target,
>       maybe_add_implicit_barrier_cancel, lower_omp_single_simple,
>       lower_omp_critical, lower_omp_for, task_copyfn_copy_decl,
>       lower_depend_clauses, lower_omp_target, lower_omp_1,
>       ipa_simd_modify_stmt_ops, simd_clone_adjust): Likewise.
>       * tree-parloops.c (take_address_of, create_phi_for_local_result,
>       create_call_for_reduction_1, separate_decls_in_region,
>       create_parallel_loop): Likewise.
>       * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence,
>       handle_scalar_deps_crossing_scop_limits): Likewise.
>       * trans-mem.c (lower_transaction, build_tm_load, build_tm_store,
>       expand_assign_tm, expand_call_tm, expand_transaction,
>       ipa_tm_insert_gettmclone_call): Likewise.
>       * tree-vect-data-refs.c (bump_vector_ptr, vect_setup_realignment):
>       Likewise.
>       * tree-vect-stmts.c (vect_init_vector, vectorizable_mask_load_store,
>       vectorizable_call, vectorizable_simd_clone_call,
>       vectorizable_conversion, vectorizable_store, permute_vec_elements,
>       vectorizable_load): Likewise.
>c/
>       * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
>       c_finish_stmt_expr): Remove NULL last argument from
>       create_tmp_var_raw and create_tmp_var calls.
>       * c-array-notation.c (fix_builtin_array_notation_fn,
>       build_array_notation_expr, fix_conditional_array_notations_1,
>       fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
>cp/
>       * cp-gimplify.c (cxx_omp_clause_apply_fn): Remove NULL last argument
>       from create_tmp_var calls.
>c-family/
>       * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
>       last argument from create_tmp_var_raw and create_tmp_var calls.
>       * cilk.c (gimplify_cilk_spawn): Likewise.
>       * c-omp.c (c_finish_omp_atomic): Likewise.
>fortran/
>       * trans-openmp.c (gfc_omp_finish_clause,
>       gfc_trans_omp_array_reduction_or_udr, gfc_trans_omp_atomic): Remove
>       NULL last argument from create_tmp_var_raw and create_tmp_var calls.
>
>--- gcc/gimple-expr.h.jj       2014-09-25 15:03:09.000000000 +0200
>+++ gcc/gimple-expr.h  2014-11-28 15:47:18.113147394 +0100
>@@ -30,9 +30,9 @@ extern const char *gimple_decl_printable
> extern tree copy_var_decl (tree, tree, tree);
> extern bool gimple_can_coalesce_p (tree, tree);
> extern tree create_tmp_var_name (const char *);
>-extern tree create_tmp_var_raw (tree, const char *);
>-extern tree create_tmp_var (tree, const char *);
>-extern tree create_tmp_reg (tree, const char *);
>+extern tree create_tmp_var_raw (tree, const char * = NULL);
>+extern tree create_tmp_var (tree, const char * = NULL);
>+extern tree create_tmp_reg (tree, const char * = NULL);
> extern tree create_tmp_reg_fn (struct function *, tree, const char *);
> 
> 
>--- gcc/tree-ssanames.h.jj     2014-09-25 15:03:14.000000000 +0200
>+++ gcc/tree-ssanames.h        2014-11-28 15:45:34.269983617 +0100
>@@ -102,7 +102,7 @@ extern void replace_ssa_name_symbol (tre
>    in function cfun.  */
> 
> static inline tree
>-make_ssa_name (tree var, gimple stmt)
>+make_ssa_name (tree var, gimple stmt = NULL)
> {
>   return make_ssa_name_fn (cfun, var, stmt);
> }
>@@ -111,7 +111,7 @@ make_ssa_name (tree var, gimple stmt)
>    statement STMT in function cfun.  */
> 
> static inline tree
>-copy_ssa_name (tree var, gimple stmt)
>+copy_ssa_name (tree var, gimple stmt = NULL)
> {
>   return copy_ssa_name_fn (cfun, var, stmt);
> }
>--- gcc/gimple-low.c.jj        2014-11-20 17:06:26.000000000 +0100
>+++ gcc/gimple-low.c   2014-11-28 16:31:49.360905976 +0100
>@@ -828,10 +828,10 @@ lower_builtin_posix_memalign (gimple_stm
>   tree pptr = gimple_call_arg (call, 0);
>   tree align = gimple_call_arg (call, 1);
>   tree res = gimple_call_lhs (call);
>-  tree ptr = create_tmp_reg (ptr_type_node, NULL);
>+  tree ptr = create_tmp_reg (ptr_type_node);
>   if (TREE_CODE (pptr) == ADDR_EXPR)
>     {
>-      tree tem = create_tmp_var (ptr_type_node, NULL);
>+      tree tem = create_tmp_var (ptr_type_node);
>       TREE_ADDRESSABLE (tem) = 1;
>       gimple_call_set_arg (call, 0, build_fold_addr_expr (tem));
>       stmt = gimple_build_assign (ptr, tem);
>@@ -842,7 +842,7 @@ lower_builtin_posix_memalign (gimple_stm
>                                            build_int_cst (ptr_type_node, 0)));
>   if (res == NULL_TREE)
>     {
>-      res = create_tmp_reg (integer_type_node, NULL);
>+      res = create_tmp_reg (integer_type_node);
>       gimple_call_set_lhs (call, res);
>     }
>   tree align_label = create_artificial_label (UNKNOWN_LOCATION);
>--- gcc/tree-ssa-strlen.c.jj   2014-11-21 18:04:58.000000000 +0100
>+++ gcc/tree-ssa-strlen.c      2014-11-28 16:13:53.869939836 +0100
>@@ -468,7 +468,7 @@ get_string_length (strinfo si)
>         lenstmt
>           = gimple_build_assign_with_ops
>               (POINTER_PLUS_EXPR,
>-               make_ssa_name (TREE_TYPE (gimple_call_arg (stmt, 0)), NULL),
>+               make_ssa_name (TREE_TYPE (gimple_call_arg (stmt, 0))),
>                tem, lhs);
>         gsi_insert_before (&gsi, lenstmt, GSI_SAME_STMT);
>         gimple_call_set_arg (stmt, 0, gimple_assign_lhs (lenstmt));
>--- gcc/tree-emutls.c.jj       2014-11-20 17:06:25.000000000 +0100
>+++ gcc/tree-emutls.c  2014-11-28 16:36:48.634608571 +0100
>@@ -425,7 +425,7 @@ gen_emutls_addr (tree decl, struct lower
>       cdecl = cvar->decl;
>       TREE_ADDRESSABLE (cdecl) = 1;
> 
>-      addr = create_tmp_var (build_pointer_type (TREE_TYPE (decl)),
>NULL);
>+      addr = create_tmp_var (build_pointer_type (TREE_TYPE (decl)));
>x = gimple_build_call (d->builtin_decl, 1, build_fold_addr_expr
>(cdecl));
>       gimple_set_location (x, d->loc);
> 
>@@ -493,7 +493,7 @@ lower_emutls_1 (tree *ptr, int *walk_sub
>           {
>             gimple x;
> 
>-            addr = create_tmp_var (TREE_TYPE (t), NULL);
>+            addr = create_tmp_var (TREE_TYPE (t));
>             x = gimple_build_assign (addr, t);
>             gimple_set_location (x, d->loc);
> 
>--- gcc/fortran/trans-openmp.c.jj      2014-11-28 14:40:59.000000000 +0100
>+++ gcc/fortran/trans-openmp.c 2014-11-28 16:44:30.791441726 +0100
>@@ -1069,7 +1069,7 @@ gfc_omp_finish_clause (tree c, gimple_se
>       OMP_CLAUSE_MAP_KIND (c3) = OMP_CLAUSE_MAP_POINTER;
>       OMP_CLAUSE_DECL (c3) = gfc_conv_descriptor_data_get (decl);
>       OMP_CLAUSE_SIZE (c3) = size_int (0);
>-      tree size = create_tmp_var (gfc_array_index_type, NULL);
>+      tree size = create_tmp_var (gfc_array_index_type);
>       tree elemsz = TYPE_SIZE_UNIT (gfc_get_element_type (type));
>       elemsz = fold_convert (gfc_array_index_type, elemsz);
>       if (GFC_TYPE_ARRAY_AKIND (type) == GFC_ARRAY_POINTER
>@@ -1361,7 +1361,7 @@ gfc_trans_omp_array_reduction_or_udr (tr
>   decl = OMP_CLAUSE_DECL (c);
>   gfc_current_locus = where;
>   type = TREE_TYPE (decl);
>-  outer_decl = create_tmp_var_raw (type, NULL);
>+  outer_decl = create_tmp_var_raw (type);
>   if (TREE_CODE (decl) == PARM_DECL
>       && TREE_CODE (type) == REFERENCE_TYPE
>       && GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (type))
>@@ -2689,7 +2689,7 @@ gfc_trans_omp_atomic (gfc_code *code)
>     {
> /* Make sure LHS is simple enough so that goa_lhs_expr_p can recognize
>        it even after unsharing function body.  */
>-      tree var = create_tmp_var_raw (TREE_TYPE (lhsaddr), NULL);
>+      tree var = create_tmp_var_raw (TREE_TYPE (lhsaddr));
>       DECL_CONTEXT (var) = current_function_decl;
>      lhsaddr = build4 (TARGET_EXPR, TREE_TYPE (lhsaddr), var, lhsaddr,
>                       NULL_TREE, NULL_TREE);
>--- gcc/tree-ssa-phiprop.c.jj  2014-11-20 17:06:26.000000000 +0100
>+++ gcc/tree-ssa-phiprop.c     2014-11-28 16:12:00.269949796 +0100
>@@ -208,7 +208,7 @@ phiprop_insert_phi (basic_block bb, gphi
>       {
>         tree rhs = gimple_assign_rhs1 (use_stmt);
>         gcc_assert (TREE_CODE (old_arg) == ADDR_EXPR);
>-        new_var = make_ssa_name (TREE_TYPE (rhs), NULL);
>+        new_var = make_ssa_name (TREE_TYPE (rhs));
>         if (!is_gimple_min_invariant (old_arg))
>           old_arg = PHI_ARG_DEF_FROM_EDGE (phi, e);
>         else
>--- gcc/tree-vect-slp.c.jj     2014-11-28 14:41:00.000000000 +0100
>+++ gcc/tree-vect-slp.c        2014-11-28 16:18:11.609379571 +0100
>@@ -2669,8 +2669,7 @@ vect_get_constant_vectors (tree op, slp_
>               }
>             else
>               {
>-                tree new_temp
>-                  = make_ssa_name (TREE_TYPE (vector_type), NULL);
>+                tree new_temp = make_ssa_name (TREE_TYPE (vector_type));
>                 gimple init_stmt;
>                 op = build1 (VIEW_CONVERT_EXPR, TREE_TYPE (vector_type),
>                              op);               
>--- gcc/ipa-prop.c.jj  2014-11-28 14:40:59.000000000 +0100
>+++ gcc/ipa-prop.c     2014-11-28 16:32:58.907674937 +0100
>@@ -4004,7 +4004,7 @@ ipa_modify_call_arguments (struct cgraph
>                     expr = make_ssa_name (TREE_TYPE (expr), tem);
>                   }
>                 else
>-                  expr = create_tmp_reg (TREE_TYPE (expr), NULL);
>+                  expr = create_tmp_reg (TREE_TYPE (expr));
>                 gimple_assign_set_lhs (tem, expr);
>                 gsi_insert_before (&gsi, tem, GSI_SAME_STMT);
>               }
>--- gcc/tree-ssa-forwprop.c.jj 2014-11-20 17:06:26.000000000 +0100
>+++ gcc/tree-ssa-forwprop.c    2014-11-28 16:08:49.322328292 +0100
>@@ -1723,14 +1723,14 @@ simplify_rotate (gimple_stmt_iterator *g
>                                 TREE_TYPE (rotcnt)))
>     {
>       g = gimple_build_assign_with_ops (NOP_EXPR,
>-                                      make_ssa_name (TREE_TYPE (def_arg2[0]),
>-                                                     NULL), rotcnt);
>+                                      make_ssa_name (TREE_TYPE (def_arg2[0])),
>+                                      rotcnt);
>       gsi_insert_before (gsi, g, GSI_SAME_STMT);
>       rotcnt = gimple_assign_lhs (g);
>     }
>   lhs = gimple_assign_lhs (stmt);
>   if (!useless_type_conversion_p (rtype, TREE_TYPE (def_arg1[0])))
>-    lhs = make_ssa_name (TREE_TYPE (def_arg1[0]), NULL);
>+    lhs = make_ssa_name (TREE_TYPE (def_arg1[0]));
>g = gimple_build_assign_with_ops (((def_code[0] == LSHIFT_EXPR) ^
>swapped_p)
>                                   ? LROTATE_EXPR : RROTATE_EXPR,
>                                   lhs, def_arg1[0], rotcnt);
>--- gcc/tree-ssa-ccp.c.jj      2014-11-20 17:06:26.000000000 +0100
>+++ gcc/tree-ssa-ccp.c 2014-11-28 16:37:29.408886831 +0100
>@@ -2065,7 +2065,7 @@ fold_builtin_alloca_with_align (gimple s
>   elem_type = build_nonstandard_integer_type (BITS_PER_UNIT, 1);
>   n_elem = size * 8 / BITS_PER_UNIT;
>   array_type = build_array_type_nelts (elem_type, n_elem);
>-  var = create_tmp_var (array_type, NULL);
>+  var = create_tmp_var (array_type);
>   DECL_ALIGN (var) = TREE_INT_CST_LOW (gimple_call_arg (stmt, 1));
>   {
>     struct ptr_info_def *pi = SSA_NAME_PTR_INFO (lhs);
>--- gcc/asan.c.jj      2014-11-28 14:40:59.000000000 +0100
>+++ gcc/asan.c 2014-11-28 15:51:42.660473720 +0100
>@@ -1585,29 +1585,25 @@ build_shadow_mem_access (gimple_stmt_ite
>   gimple g;
> 
>   t = build_int_cst (uintptr_type, ASAN_SHADOW_SHIFT);
>-  g = gimple_build_assign_with_ops (RSHIFT_EXPR,
>-                                  make_ssa_name (uintptr_type, NULL),
>+  g = gimple_build_assign_with_ops (RSHIFT_EXPR, make_ssa_name
>(uintptr_type),
>                                   base_addr, t);
>   gimple_set_location (g, location);
>   gsi_insert_after (gsi, g, GSI_NEW_STMT);
> 
>   t = build_int_cst (uintptr_type, asan_shadow_offset ());
>-  g = gimple_build_assign_with_ops (PLUS_EXPR,
>-                                  make_ssa_name (uintptr_type, NULL),
>+  g = gimple_build_assign_with_ops (PLUS_EXPR, make_ssa_name
>(uintptr_type),
>                                   gimple_assign_lhs (g), t);
>   gimple_set_location (g, location);
>   gsi_insert_after (gsi, g, GSI_NEW_STMT);
> 
>-  g = gimple_build_assign_with_ops (NOP_EXPR,
>-                                  make_ssa_name (shadow_ptr_type, NULL),
>+  g = gimple_build_assign_with_ops (NOP_EXPR, make_ssa_name
>(shadow_ptr_type),
>                                   gimple_assign_lhs (g));
>   gimple_set_location (g, location);
>   gsi_insert_after (gsi, g, GSI_NEW_STMT);
> 
>   t = build2 (MEM_REF, shadow_type, gimple_assign_lhs (g),
>             build_int_cst (shadow_ptr_type, 0));
>-  g = gimple_build_assign_with_ops (MEM_REF,
>-                                  make_ssa_name (shadow_type, NULL), t);
>+  g = gimple_build_assign_with_ops (MEM_REF, make_ssa_name
>(shadow_type), t);
>   gimple_set_location (g, location);
>   gsi_insert_after (gsi, g, GSI_NEW_STMT);
>   return gimple_assign_lhs (g);
>@@ -1624,8 +1620,7 @@ maybe_create_ssa_name (location_t loc, t
>     return base;
>   gimple g
>     = gimple_build_assign_with_ops (TREE_CODE (base),
>-                                  make_ssa_name (TREE_TYPE (base), NULL),
>-                                  base);
>+                                  make_ssa_name (TREE_TYPE (base)), base);
>   gimple_set_location (g, loc);
>   if (before_p)
>     gsi_insert_before (iter, g, GSI_SAME_STMT);
>@@ -1645,8 +1640,8 @@ maybe_cast_to_ptrmode (location_t loc, t
>     return len;
>   gimple g
>     = gimple_build_assign_with_ops (NOP_EXPR,
>-                                  make_ssa_name (pointer_sized_int_node,
>-                                                 NULL), len);
>+                                  make_ssa_name (pointer_sized_int_node),
>+                                  len);
>   gimple_set_location (g, loc);
>   if (before_p)
>     gsi_insert_before (iter, g, GSI_SAME_STMT);
>@@ -2549,8 +2544,8 @@ asan_expand_check_ifn (gimple_stmt_itera
>       /* Instrument using callbacks.  */
>       gimple g
>       = gimple_build_assign_with_ops (NOP_EXPR,
>-                                      make_ssa_name (pointer_sized_int_node,
>-                                                     NULL), base);
>+                                      make_ssa_name (pointer_sized_int_node),
>+                                      base);
>       gimple_set_location (g, loc);
>       gsi_insert_before (iter, g, GSI_SAME_STMT);
>       tree base_addr = gimple_assign_lhs (g);
>@@ -2563,8 +2558,8 @@ asan_expand_check_ifn (gimple_stmt_itera
>       {
>         gcc_assert (nargs == 2);
>         g = gimple_build_assign_with_ops (NOP_EXPR,
>-                                          make_ssa_name 
>(pointer_sized_int_node,
>-                                                         NULL), len);
>+                                          make_ssa_name 
>(pointer_sized_int_node),
>+                                          len);
>         gimple_set_location (g, loc);
>         gsi_insert_before (iter, g, GSI_SAME_STMT);
>         tree sz_arg = gimple_assign_lhs (g);
>@@ -2622,8 +2617,8 @@ asan_expand_check_ifn (gimple_stmt_itera
>                                 &else_bb);
> 
>   g = gimple_build_assign_with_ops (NOP_EXPR,
>-                                  make_ssa_name (pointer_sized_int_node,
>-                                                 NULL), base);
>+                                  make_ssa_name (pointer_sized_int_node),
>+                                  base);
>   gimple_set_location (g, loc);
>   gsi_insert_before (&gsi, g, GSI_NEW_STMT);
>   tree base_addr = gimple_assign_lhs (g);
>@@ -2676,14 +2671,14 @@ asan_expand_check_ifn (gimple_stmt_itera
>       if (size_in_bytes == -1)
>       {
>         g = gimple_build_assign_with_ops (MINUS_EXPR,
>-                                          make_ssa_name 
>(pointer_sized_int_node, NULL),
>+                                          make_ssa_name 
>(pointer_sized_int_node),
>                                           len,
>                                           build_int_cst 
> (pointer_sized_int_node, 1));
>         gimple_set_location (g, loc);
>         gsi_insert_after (&gsi, g, GSI_NEW_STMT);
>         tree last = gimple_assign_lhs (g);
>         g = gimple_build_assign_with_ops (PLUS_EXPR,
>-                                          make_ssa_name 
>(pointer_sized_int_node, NULL),
>+                                          make_ssa_name 
>(pointer_sized_int_node),
>                                           base_addr,
>                                           last);
>         gimple_set_location (g, loc);
>--- gcc/tsan.c.jj      2014-11-19 17:18:37.000000000 +0100
>+++ gcc/tsan.c 2014-11-28 16:22:47.469497923 +0100
>@@ -168,8 +168,7 @@ instrument_expr (gimple_stmt_iterator gs
>   seq = NULL;
>   if (!is_gimple_val (expr_ptr))
>     {
>-      g = gimple_build_assign (make_ssa_name (TREE_TYPE (expr_ptr),
>NULL),
>-                             expr_ptr);
>+      g = gimple_build_assign (make_ssa_name (TREE_TYPE (expr_ptr)),
>expr_ptr);
>       expr_ptr = gimple_assign_lhs (g);
>       gimple_set_location (g, loc);
>       gimple_seq_add_stmt_without_update (&seq, g);
>@@ -500,17 +499,16 @@ instrument_builtin_call (gimple_stmt_ite
>               if (!useless_type_conversion_p (TREE_TYPE (lhs),
>                                               TREE_TYPE (args[1])))
>                 {
>-                  tree var = make_ssa_name (TREE_TYPE (lhs), NULL);
>+                  tree var = make_ssa_name (TREE_TYPE (lhs));
>                   g = gimple_build_assign_with_ops (NOP_EXPR, var, args[1]);
>                   gsi_insert_after (gsi, g, GSI_NEW_STMT);
>                   args[1] = var;
>                 }
>-              gimple_call_set_lhs (stmt,
>-                                   make_ssa_name (TREE_TYPE (lhs), NULL));
>+              gimple_call_set_lhs (stmt, make_ssa_name (TREE_TYPE (lhs)));
>               /* BIT_NOT_EXPR stands for NAND.  */
>               if (tsan_atomic_table[i].code == BIT_NOT_EXPR)
>                 {
>-                  tree var = make_ssa_name (TREE_TYPE (lhs), NULL);
>+                  tree var = make_ssa_name (TREE_TYPE (lhs));
>                   g = gimple_build_assign_with_ops (BIT_AND_EXPR, var,
>                                                     gimple_call_lhs (stmt),
>                                                     args[1]);
>@@ -550,14 +548,13 @@ instrument_builtin_call (gimple_stmt_ite
>             args[j] = gimple_call_arg (stmt, j);
>           t = TYPE_ARG_TYPES (TREE_TYPE (decl));
>           t = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (t)));
>-          t = create_tmp_var (t, NULL);
>+          t = create_tmp_var (t);
>           mark_addressable (t);
>           if (!useless_type_conversion_p (TREE_TYPE (t),
>                                           TREE_TYPE (args[1])))
>             {
>               g = gimple_build_assign_with_ops (NOP_EXPR,
>-                                                make_ssa_name (TREE_TYPE (t),
>-                                                               NULL),
>+                                                make_ssa_name (TREE_TYPE (t)),
>                                                 args[1]);
>               gsi_insert_before (gsi, g, GSI_SAME_STMT);
>               args[1] = gimple_assign_lhs (g);
>@@ -575,8 +572,7 @@ instrument_builtin_call (gimple_stmt_ite
>             {
>               tree cond;
>               stmt = gsi_stmt (*gsi);
>-              g = gimple_build_assign (make_ssa_name (TREE_TYPE (t), NULL),
>-                                       t);
>+              g = gimple_build_assign (make_ssa_name (TREE_TYPE (t)), t);
>               gsi_insert_after (gsi, g, GSI_NEW_STMT);
>               t = make_ssa_name (TREE_TYPE (TREE_TYPE (decl)), stmt);
>               cond = build2 (NE_EXPR, boolean_type_node, t,
>@@ -671,7 +667,7 @@ instrument_func_entry (void)
> 
>   builtin_decl = builtin_decl_implicit (BUILT_IN_RETURN_ADDRESS);
>   g = gimple_build_call (builtin_decl, 1, integer_zero_node);
>-  ret_addr = make_ssa_name (ptr_type_node, NULL);
>+  ret_addr = make_ssa_name (ptr_type_node);
>   gimple_call_set_lhs (g, ret_addr);
>   gimple_set_location (g, cfun->function_start_locus);
>   gsi_insert_before (&gsi, g, GSI_SAME_STMT);
>--- gcc/varpool.c.jj   2014-11-19 17:18:37.000000000 +0100
>+++ gcc/varpool.c      2014-11-28 16:39:23.026878169 +0100
>@@ -752,7 +752,7 @@ add_new_static_var (tree type)
>   tree new_decl;
>   varpool_node *new_node;
> 
>-  new_decl = create_tmp_var_raw (type, NULL);
>+  new_decl = create_tmp_var_raw (type);
>   DECL_NAME (new_decl) = create_tmp_var_name (NULL);
>   TREE_READONLY (new_decl) = 0;
>   TREE_STATIC (new_decl) = 1;
>--- gcc/tree-loop-distribution.c.jj    2014-11-20 17:06:24.000000000 +0100
>+++ gcc/tree-loop-distribution.c       2014-11-28 16:04:07.164320602 +0100
>@@ -822,7 +822,7 @@ generate_memset_builtin (struct loop *lo
>     val = fold_convert (integer_type_node, val);
>else if (!useless_type_conversion_p (integer_type_node, TREE_TYPE
>(val)))
>     {
>-      tree tem = make_ssa_name (integer_type_node, NULL);
>+      tree tem = make_ssa_name (integer_type_node);
>      gimple cstmt = gimple_build_assign_with_ops (NOP_EXPR, tem, val);
>       gsi_insert_after (&gsi, cstmt, GSI_CONTINUE_LINKING);
>       val = tem;
>--- gcc/gimplify.c.jj  2014-11-20 17:06:26.000000000 +0100
>+++ gcc/gimplify.c     2014-11-28 16:32:22.430320618 +0100
>@@ -530,7 +530,7 @@ internal_get_tmp_var (tree val, gimple_s
> 
>   if (gimplify_ctxp->into_ssa
>       && is_gimple_reg_type (TREE_TYPE (val)))
>-    t = make_ssa_name (TYPE_MAIN_VARIANT (TREE_TYPE (val)), NULL);
>+    t = make_ssa_name (TYPE_MAIN_VARIANT (TREE_TYPE (val)));
>   else
>     t = lookup_tmp_var (val, is_formal);
> 
>@@ -1271,7 +1271,7 @@ gimplify_return_expr (tree stmt, gimple_
>     result = gimplify_ctxp->return_temp;
>   else
>     {
>-      result = create_tmp_reg (TREE_TYPE (result_decl), NULL);
>+      result = create_tmp_reg (TREE_TYPE (result_decl));
> 
>   /* ??? With complex control flow (usually involving abnormal edges),
>        we can wind up warning about an uninitialized value for this.  Due
>@@ -3263,7 +3263,7 @@ gimplify_modify_expr_to_memcpy (tree *ex
>   if (want_value)
>     {
>       /* tmp = memcpy() */
>-      t = create_tmp_var (TREE_TYPE (to_ptr), NULL);
>+      t = create_tmp_var (TREE_TYPE (to_ptr));
>       gimple_call_set_lhs (gs, t);
>       gimplify_seq_add_stmt (seq_p, gs);
> 
>@@ -3310,7 +3310,7 @@ gimplify_modify_expr_to_memset (tree *ex
>   if (want_value)
>     {
>       /* tmp = memset() */
>-      t = create_tmp_var (TREE_TYPE (to_ptr), NULL);
>+      t = create_tmp_var (TREE_TYPE (to_ptr));
>       gimple_call_set_lhs (gs, t);
>       gimplify_seq_add_stmt (seq_p, gs);
> 
>@@ -3486,7 +3486,7 @@ gimplify_init_ctor_eval_range (tree obje
> 
>   /* Create and initialize the index variable.  */
>   var_type = TREE_TYPE (upper);
>-  var = create_tmp_var (var_type, NULL);
>+  var = create_tmp_var (var_type);
>   gimplify_seq_add_stmt (pre_p, gimple_build_assign (var, lower));
> 
>   /* Add the loop entry label.  */
>@@ -3945,7 +3945,7 @@ gimplify_init_constructor (tree *expr_p,
>           && num_nonzero_elements > 0
>           && vec_safe_length (elts) > 1)
>         {
>-          tree temp = create_tmp_var (TYPE_MAIN_VARIANT (type), NULL);
>+          tree temp = create_tmp_var (TYPE_MAIN_VARIANT (type));
>           TREE_OPERAND (*expr_p, 0) = temp;
>           *expr_p = build2 (COMPOUND_EXPR, TREE_TYPE (*expr_p),
>                             *expr_p,
>@@ -7374,7 +7374,7 @@ gimplify_omp_atomic (tree *expr_p, gimpl
>   gomp_atomic_load *loadstmt;
>   gomp_atomic_store *storestmt;
> 
>-  tmp_load = create_tmp_reg (type, NULL);
>+  tmp_load = create_tmp_reg (type);
>   if (rhs && goa_stabilize_expr (&rhs, pre_p, addr, tmp_load) < 0)
>     return GS_ERROR;
> 
>@@ -7791,7 +7791,7 @@ gimplify_expr (tree *expr_p, gimple_seq
>               ret = GS_OK;
>               break;
>             }
>-          tree tmp = create_tmp_var (type, NULL);
>+          tree tmp = create_tmp_var (type);
>           gimplify_arg (&cond, pre_p, EXPR_LOCATION (*expr_p));
>           gcall *call
>             = gimple_build_call_internal (IFN_ANNOTATE, 2, cond, kind);
>--- gcc/gimple-builder.c.jj    2014-11-20 17:06:26.000000000 +0100
>+++ gcc/gimple-builder.c       2014-11-28 15:53:54.189150044 +0100
>@@ -65,7 +65,7 @@ build_assign (enum tree_code code, tree
> {
>   tree op2 = build_int_cst (TREE_TYPE (op1), val);
>   if (lhs == NULL_TREE)
>-    lhs = make_ssa_name (get_expr_type (code, op1), NULL);
>+    lhs = make_ssa_name (get_expr_type (code, op1));
>   return gimple_build_assign_with_ops (code, lhs, op1, op2);
> }
> 
>@@ -88,7 +88,7 @@ gassign *
> build_assign (enum tree_code code, tree op1, tree op2, tree lhs)
> {
>   if (lhs == NULL_TREE)
>-    lhs = make_ssa_name (get_expr_type (code, op1), NULL);
>+    lhs = make_ssa_name (get_expr_type (code, op1));
>   return gimple_build_assign_with_ops (code, lhs, op1, op2);
> }
> 
>@@ -119,7 +119,7 @@ gassign *
> build_type_cast (tree to_type, tree op, tree lhs)
> {
>   if (lhs == NULL_TREE)
>-    lhs = make_ssa_name (to_type, NULL);
>+    lhs = make_ssa_name (to_type);
>   return gimple_build_assign_with_ops (NOP_EXPR, lhs, op);
> }
> 
>--- gcc/tree-vect-loop-manip.c.jj      2014-11-20 17:06:25.000000000 +0100
>+++ gcc/tree-vect-loop-manip.c 2014-11-28 16:28:58.700926805 +0100
>@@ -432,7 +432,7 @@ slpeel_update_phi_nodes_for_guard1 (edge
>       /** 1. Handle new-merge-point phis  **/
> 
>       /* 1.1. Generate new phi node in NEW_MERGE_BB:  */
>-      new_res = copy_ssa_name (PHI_RESULT (orig_phi), NULL);
>+      new_res = copy_ssa_name (PHI_RESULT (orig_phi));
>       new_phi = create_phi_node (new_res, new_merge_bb);
> 
>/* 1.2. NEW_MERGE_BB has two incoming edges: GUARD_EDGE and the
>exit-edge
>@@ -462,7 +462,7 @@ slpeel_update_phi_nodes_for_guard1 (edge
>       continue;
> 
>       /* 2.1. Generate new phi node in NEW_EXIT_BB:  */
>-      new_res = copy_ssa_name (PHI_RESULT (orig_phi), NULL);
>+      new_res = copy_ssa_name (PHI_RESULT (orig_phi));
>       new_phi = create_phi_node (new_res, *new_exit_bb);
> 
>/* 2.2. NEW_EXIT_BB has one incoming edge: the exit-edge of the loop. 
>*/
>@@ -576,7 +576,7 @@ slpeel_update_phi_nodes_for_guard2 (edge
>       /** 1. Handle new-merge-point phis  **/
> 
>       /* 1.1. Generate new phi node in NEW_MERGE_BB:  */
>-      new_res = copy_ssa_name (PHI_RESULT (orig_phi), NULL);
>+      new_res = copy_ssa_name (PHI_RESULT (orig_phi));
>       new_phi = create_phi_node (new_res, new_merge_bb);
> 
>/* 1.2. NEW_MERGE_BB has two incoming edges: GUARD_EDGE and the
>exit-edge
>@@ -618,7 +618,7 @@ slpeel_update_phi_nodes_for_guard2 (edge
>       /** 2. Handle loop-closed-ssa-form phis  **/
> 
>       /* 2.1. Generate new phi node in NEW_EXIT_BB:  */
>-      new_res = copy_ssa_name (PHI_RESULT (orig_phi), NULL);
>+      new_res = copy_ssa_name (PHI_RESULT (orig_phi));
>       new_phi = create_phi_node (new_res, *new_exit_bb);
> 
>/* 2.2. NEW_EXIT_BB has one incoming edge: the exit-edge of the loop. 
>*/
>@@ -653,7 +653,7 @@ slpeel_update_phi_nodes_for_guard2 (edge
>       arg = guard_arg;
> 
>       /* 3.2. Generate new phi node in GUARD_BB:  */
>-      new_res = copy_ssa_name (PHI_RESULT (orig_phi), NULL);
>+      new_res = copy_ssa_name (PHI_RESULT (orig_phi));
>       new_phi = create_phi_node (new_res, guard_edge->src);
> 
>       /* 3.3. GUARD_BB has one incoming edge:  */
>@@ -1224,7 +1224,7 @@ slpeel_tree_peel_loop_to_edge (struct lo
>           break;
>       if (gsi_end_p (gsi))
>         {
>-          tree new_vop = copy_ssa_name (PHI_RESULT (phi), NULL);
>+          tree new_vop = copy_ssa_name (PHI_RESULT (phi));
>           gphi *new_phi = create_phi_node (new_vop, exit_e->dest);
>           tree vop = PHI_ARG_DEF_FROM_EDGE (phi, EDGE_SUCC (loop->latch,
>0));
>           imm_use_iterator imm_iter;
>@@ -2439,7 +2439,7 @@ vect_loop_versioning (loop_vec_info loop
>       {
>         tree new_res;
>         orig_phi = gsi.phi ();
>-        new_res = copy_ssa_name (PHI_RESULT (orig_phi), NULL);
>+        new_res = copy_ssa_name (PHI_RESULT (orig_phi));
>         new_phi = create_phi_node (new_res, new_exit_bb);
>         arg = PHI_ARG_DEF_FROM_EDGE (orig_phi, e);
>         add_phi_arg (new_phi, arg, new_exit_e,
>--- gcc/tree-if-conv.c.jj      2014-11-20 17:06:26.000000000 +0100
>+++ gcc/tree-if-conv.c 2014-11-28 16:02:34.728953830 +0100
>@@ -2108,7 +2108,7 @@ static bool
> version_loop_for_if_conversion (struct loop *loop)
> {
>   basic_block cond_bb;
>-  tree cond = make_ssa_name (boolean_type_node, NULL);
>+  tree cond = make_ssa_name (boolean_type_node);
>   struct loop *new_loop;
>   gimple g;
>   gimple_stmt_iterator gsi;
>--- gcc/gimple-match-head.c.jj 2014-11-28 14:40:59.000000000 +0100
>+++ gcc/gimple-match-head.c    2014-11-28 15:56:05.523829795 +0100
>@@ -330,7 +330,7 @@ maybe_push_res_to_seq (code_helper rcode
>             && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (ops[2])))
>       return NULL_TREE;
>       if (!res)
>-      res = make_ssa_name (type, NULL);
>+      res = make_ssa_name (type);
>       maybe_build_generic_op (rcode, type, &ops[0], ops[1], ops[2]);
>       gimple new_stmt = gimple_build_assign_with_ops (rcode, res,
>                                                     ops[0], ops[1], ops[2]);
>@@ -358,7 +358,7 @@ maybe_push_res_to_seq (code_helper rcode
>             && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (ops[2])))
>       return NULL_TREE;
>       if (!res)
>-      res = make_ssa_name (type, NULL);
>+      res = make_ssa_name (type);
>gimple new_stmt = gimple_build_call (decl, nargs, ops[0], ops[1],
>ops[2]);
>       gimple_call_set_lhs (new_stmt, res);
>       gimple_seq_add_stmt_without_update (seq, new_stmt);
>--- gcc/tree-vect-patterns.c.jj        2014-11-20 17:06:26.000000000 +0100
>+++ gcc/tree-vect-patterns.c   2014-11-28 16:17:47.425807458 +0100
>@@ -759,7 +759,7 @@ vect_handle_widen_op_by_const (gimple st
>     {
>       /* Create a_T = (NEW_TYPE) a_t;  */
>       *oprnd = gimple_assign_rhs1 (def_stmt);
>-      new_oprnd = make_ssa_name (new_type, NULL);
>+      new_oprnd = make_ssa_name (new_type);
> new_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd, *oprnd);
>       STMT_VINFO_RELATED_STMT (vinfo_for_stmt (def_stmt)) = new_stmt;
>       stmts->safe_push (def_stmt);
>@@ -932,7 +932,7 @@ vect_recog_widen_mult_pattern (vec<gimpl
>       }
> 
>         tree old_oprnd = gimple_assign_rhs1 (def_stmt);
>-        tree new_oprnd = make_ssa_name (half_type0, NULL);
>+      tree new_oprnd = make_ssa_name (half_type0);
>         new_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd,
>                                                old_oprnd);
>  


Reply via email to