summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-19 14:43:02 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-19 14:43:02 +0000
commit806413d26490233a4f1b6e666876f94d43b32f1b (patch)
tree2167f9378a88e24dbc4dcb866270087c8a42fe0a
parentaa577f0f642afbbdd4820dac4c8c6be17dc4d827 (diff)
downloadgcc-806413d26490233a4f1b6e666876f94d43b32f1b.tar.gz
* gimple.h (gimple_build_assign_with_ops): Add unary arg overload.
(gimple_assign_set_rhs_with_ops_1): Renamed to ... (gimple_assign_set_rhs_with_ops): ... this. Adjust binary arg inline overload to use it. Add unary arg overload. * gimple.c (gimple_build_assign_with_ops): New unary arg overload. (gimple_assign_set_rhs_from_tree): Use gimple_assign_set_rhs_with_ops instead of gimple_assign_set_rhs_with_ops_1. (gimple_assign_set_rhs_with_ops_1): Renamed to ... (gimple_assign_set_rhs_with_ops): ... this. * ipa-split.c (split_function): Remove last NULL argument from gimple_build_assign_with_ops call. * tree-ssa-loop-im.c (move_computations_dom_walker::before_dom_children): Likewise. * tsan.c (instrument_builtin_call): Likewise. * tree-vect-stmts.c (vect_init_vector, vectorizable_mask_load_store, vectorizable_conversion, vectorizable_load): Likewise. * tree-vect-loop.c (vect_is_simple_reduction_1, get_initial_def_for_induction): Likewise. * tree-loop-distribution.c (generate_memset_builtin): 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, vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern, vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast, adjust_bool_pattern, vect_recog_bool_pattern): Likewise. * tree-ssa-phiopt.c (conditional_replacement, abs_replacement, neg_replacement): Likewise. * asan.c (build_shadow_mem_access, maybe_create_ssa_name, maybe_cast_to_ptrmode, asan_expand_check_ifn): Likewise. * tree-vect-slp.c (vect_get_constant_vectors): Likewise. * omp-low.c (lower_rec_input_clauses, expand_omp_for_generic, expand_omp_for_static_nochunk, expand_omp_for_static_chunk, simd_clone_adjust): Likewise. * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise. * gimple-ssa-strength-reduction.c (introduce_cast_before_cand, replace_one_candidate): Likewise. * gimple-builder.c (build_type_cast): Likewise. * tree-ssa-forwprop.c (simplify_rotate): Likewise. (forward_propagate_addr_expr_1): Remove last NULL argument from gimple_assign_set_rhs_with_ops call. (simplify_vector_constructor): Use gimple_assign_set_rhs_with_ops instead of gimple_assign_set_rhs_with_ops_1. * tree-ssa-reassoc.c (maybe_optimize_range_tests): Remove last NULL argument from gimple_build_assign_with_ops call. (repropagate_negates): Remove last NULL argument from gimple_assign_set_rhs_with_ops call. * ubsan.c (ubsan_expand_null_ifn, ubsan_expand_objsize_ifn): Remove last NULL argument from gimple_build_assign_with_ops call. (instrument_bool_enum_load): Likewise. Remove last NULL argument from gimple_assign_set_rhs_with_ops call. * tree-ssa-math-opts.c (build_and_insert_cast, convert_mult_to_fma): Remove last NULL argument from gimple_build_assign_with_ops call. (bswap_replace): Likewise. Use gimple_assign_set_rhs_with_ops instead of gimple_assign_set_rhs_with_ops_1. (convert_plusminus_to_widen): Use gimple_assign_set_rhs_with_ops instead of gimple_assign_set_rhs_with_ops_1. * gimple-fold.c (replace_stmt_with_simplification): Likewise. (rewrite_to_defined_overflow, gimple_build): Remove last NULL argument from gimple_build_assign_with_ops call. * tree-ssa-strlen.c (handle_pointer_plus): Remove last NULL argument from gimple_assign_set_rhs_with_ops call. * tree-vrp.c (simplify_truth_ops_using_ranges, simplify_bit_ops_using_ranges): Remove last NULL argument from gimple_assign_set_rhs_with_ops call. (simplify_float_conversion_using_ranges, simplify_internal_call_using_ranges): Remove last NULL argument from gimple_build_assign_with_ops call. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217781 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog71
-rw-r--r--gcc/asan.c20
-rw-r--r--gcc/gimple-builder.c2
-rw-r--r--gcc/gimple-fold.c15
-rw-r--r--gcc/gimple-ssa-strength-reduction.c6
-rw-r--r--gcc/gimple.c14
-rw-r--r--gcc/gimple.h22
-rw-r--r--gcc/ipa-split.c2
-rw-r--r--gcc/omp-low.c17
-rw-r--r--gcc/tree-loop-distribution.c3
-rw-r--r--gcc/tree-ssa-forwprop.c12
-rw-r--r--gcc/tree-ssa-loop-im.c2
-rw-r--r--gcc/tree-ssa-math-opts.c20
-rw-r--r--gcc/tree-ssa-phiopt.c10
-rw-r--r--gcc/tree-ssa-reassoc.c7
-rw-r--r--gcc/tree-ssa-strlen.c2
-rw-r--r--gcc/tree-vect-loop-manip.c2
-rw-r--r--gcc/tree-vect-loop.c8
-rw-r--r--gcc/tree-vect-patterns.c44
-rw-r--r--gcc/tree-vect-slp.c2
-rw-r--r--gcc/tree-vect-stmts.c24
-rw-r--r--gcc/tree-vrp.c17
-rw-r--r--gcc/tsan.c8
-rw-r--r--gcc/ubsan.c9
24 files changed, 195 insertions, 144 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 45e12cbd160..16f6e1b009f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,74 @@
+2014-11-19 Jakub Jelinek <jakub@redhat.com>
+
+ * gimple.h (gimple_build_assign_with_ops): Add unary arg overload.
+ (gimple_assign_set_rhs_with_ops_1): Renamed to ...
+ (gimple_assign_set_rhs_with_ops): ... this. Adjust binary arg
+ inline overload to use it. Add unary arg overload.
+ * gimple.c (gimple_build_assign_with_ops): New unary arg overload.
+ (gimple_assign_set_rhs_from_tree): Use
+ gimple_assign_set_rhs_with_ops instead of
+ gimple_assign_set_rhs_with_ops_1.
+ (gimple_assign_set_rhs_with_ops_1): Renamed to ...
+ (gimple_assign_set_rhs_with_ops): ... this.
+ * ipa-split.c (split_function): Remove last NULL argument
+ from gimple_build_assign_with_ops call.
+ * tree-ssa-loop-im.c
+ (move_computations_dom_walker::before_dom_children): Likewise.
+ * tsan.c (instrument_builtin_call): Likewise.
+ * tree-vect-stmts.c (vect_init_vector, vectorizable_mask_load_store,
+ vectorizable_conversion, vectorizable_load): Likewise.
+ * tree-vect-loop.c (vect_is_simple_reduction_1,
+ get_initial_def_for_induction): Likewise.
+ * tree-loop-distribution.c (generate_memset_builtin): 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, vect_recog_rotate_pattern,
+ vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern,
+ vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast,
+ adjust_bool_pattern, vect_recog_bool_pattern): Likewise.
+ * tree-ssa-phiopt.c (conditional_replacement, abs_replacement,
+ neg_replacement): Likewise.
+ * asan.c (build_shadow_mem_access, maybe_create_ssa_name,
+ maybe_cast_to_ptrmode, asan_expand_check_ifn): Likewise.
+ * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
+ * omp-low.c (lower_rec_input_clauses, expand_omp_for_generic,
+ expand_omp_for_static_nochunk, expand_omp_for_static_chunk,
+ simd_clone_adjust): Likewise.
+ * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
+ * gimple-ssa-strength-reduction.c (introduce_cast_before_cand,
+ replace_one_candidate): Likewise.
+ * gimple-builder.c (build_type_cast): Likewise.
+ * tree-ssa-forwprop.c (simplify_rotate): Likewise.
+ (forward_propagate_addr_expr_1): Remove last NULL argument
+ from gimple_assign_set_rhs_with_ops call.
+ (simplify_vector_constructor): Use gimple_assign_set_rhs_with_ops
+ instead of gimple_assign_set_rhs_with_ops_1.
+ * tree-ssa-reassoc.c (maybe_optimize_range_tests): Remove last NULL
+ argument from gimple_build_assign_with_ops call.
+ (repropagate_negates): Remove last NULL argument from
+ gimple_assign_set_rhs_with_ops call.
+ * ubsan.c (ubsan_expand_null_ifn, ubsan_expand_objsize_ifn): Remove
+ last NULL argument from gimple_build_assign_with_ops call.
+ (instrument_bool_enum_load): Likewise. Remove last NULL argument
+ from gimple_assign_set_rhs_with_ops call.
+ * tree-ssa-math-opts.c (build_and_insert_cast, convert_mult_to_fma):
+ Remove last NULL argument from gimple_build_assign_with_ops call.
+ (bswap_replace): Likewise. Use gimple_assign_set_rhs_with_ops instead
+ of gimple_assign_set_rhs_with_ops_1.
+ (convert_plusminus_to_widen): Use gimple_assign_set_rhs_with_ops
+ instead of gimple_assign_set_rhs_with_ops_1.
+ * gimple-fold.c (replace_stmt_with_simplification): Likewise.
+ (rewrite_to_defined_overflow, gimple_build): Remove last NULL argument
+ from gimple_build_assign_with_ops call.
+ * tree-ssa-strlen.c (handle_pointer_plus): Remove last NULL argument
+ from gimple_assign_set_rhs_with_ops call.
+ * tree-vrp.c (simplify_truth_ops_using_ranges,
+ simplify_bit_ops_using_ranges): Remove last NULL argument from
+ gimple_assign_set_rhs_with_ops call.
+ (simplify_float_conversion_using_ranges,
+ simplify_internal_call_using_ranges): Remove last NULL argument from
+ gimple_build_assign_with_ops call.
+
2014-11-19 Wilco Dijkstra <wdijkstr@arm.com>
PR target/61915
diff --git a/gcc/asan.c b/gcc/asan.c
index d50e0980018..ff08f1becd7 100644
--- a/gcc/asan.c
+++ b/gcc/asan.c
@@ -1599,15 +1599,14 @@ build_shadow_mem_access (gimple_stmt_iterator *gsi, location_t location,
g = gimple_build_assign_with_ops (NOP_EXPR,
make_ssa_name (shadow_ptr_type, NULL),
- gimple_assign_lhs (g), NULL_TREE);
+ 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, NULL_TREE);
+ make_ssa_name (shadow_type, NULL), t);
gimple_set_location (g, location);
gsi_insert_after (gsi, g, GSI_NEW_STMT);
return gimple_assign_lhs (g);
@@ -1625,7 +1624,7 @@ maybe_create_ssa_name (location_t loc, tree base, gimple_stmt_iterator *iter,
gimple g
= gimple_build_assign_with_ops (TREE_CODE (base),
make_ssa_name (TREE_TYPE (base), NULL),
- base, NULL_TREE);
+ base);
gimple_set_location (g, loc);
if (before_p)
gsi_insert_before (iter, g, GSI_SAME_STMT);
@@ -1645,8 +1644,8 @@ maybe_cast_to_ptrmode (location_t loc, tree len, gimple_stmt_iterator *iter,
return len;
gimple g
= gimple_build_assign_with_ops (NOP_EXPR,
- make_ssa_name (pointer_sized_int_node, NULL),
- len, NULL);
+ make_ssa_name (pointer_sized_int_node,
+ NULL), len);
gimple_set_location (g, loc);
if (before_p)
gsi_insert_before (iter, g, GSI_SAME_STMT);
@@ -2536,8 +2535,7 @@ asan_expand_check_ifn (gimple_stmt_iterator *iter, bool use_calls)
gimple g
= gimple_build_assign_with_ops (NOP_EXPR,
make_ssa_name (pointer_sized_int_node,
- NULL),
- base, NULL_TREE);
+ NULL), base);
gimple_set_location (g, loc);
gsi_insert_before (iter, g, GSI_SAME_STMT);
tree base_addr = gimple_assign_lhs (g);
@@ -2551,8 +2549,7 @@ asan_expand_check_ifn (gimple_stmt_iterator *iter, bool use_calls)
gcc_assert (nargs == 2);
g = gimple_build_assign_with_ops (NOP_EXPR,
make_ssa_name (pointer_sized_int_node,
- NULL),
- len, NULL_TREE);
+ NULL), len);
gimple_set_location (g, loc);
gsi_insert_before (iter, g, GSI_SAME_STMT);
tree sz_arg = gimple_assign_lhs (g);
@@ -2610,8 +2607,7 @@ asan_expand_check_ifn (gimple_stmt_iterator *iter, bool use_calls)
g = gimple_build_assign_with_ops (NOP_EXPR,
make_ssa_name (pointer_sized_int_node,
- NULL),
- base, NULL_TREE);
+ NULL), base);
gimple_set_location (g, loc);
gsi_insert_before (&gsi, g, GSI_NEW_STMT);
tree base_addr = gimple_assign_lhs (g);
diff --git a/gcc/gimple-builder.c b/gcc/gimple-builder.c
index 154994b1382..388cf679734 100644
--- a/gcc/gimple-builder.c
+++ b/gcc/gimple-builder.c
@@ -120,7 +120,7 @@ build_type_cast (tree to_type, tree op, tree lhs)
{
if (lhs == NULL_TREE)
lhs = make_ssa_name (to_type, NULL);
- return gimple_build_assign_with_ops (NOP_EXPR, lhs, op, NULL_TREE);
+ return gimple_build_assign_with_ops (NOP_EXPR, lhs, op);
}
gimple
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index 4f716b2e0e0..ae6e1e86e89 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -2983,8 +2983,7 @@ replace_stmt_with_simplification (gimple_stmt_iterator *gsi,
maybe_build_generic_op (rcode,
TREE_TYPE (gimple_assign_lhs (stmt)),
&ops[0], ops[1], ops[2]);
- gimple_assign_set_rhs_with_ops_1 (gsi, rcode,
- ops[0], ops[1], ops[2]);
+ gimple_assign_set_rhs_with_ops (gsi, rcode, ops[0], ops[1], ops[2]);
if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, "gimple_simplified to ");
@@ -5644,8 +5643,8 @@ rewrite_to_defined_overflow (gimple stmt)
if (gimple_assign_rhs_code (stmt) == POINTER_PLUS_EXPR)
gimple_assign_set_rhs_code (stmt, PLUS_EXPR);
gimple_seq_add_stmt (&stmts, stmt);
- gimple cvt = gimple_build_assign_with_ops
- (NOP_EXPR, lhs, gimple_assign_lhs (stmt), NULL_TREE);
+ gimple cvt = gimple_build_assign_with_ops (NOP_EXPR, lhs,
+ gimple_assign_lhs (stmt));
gimple_seq_add_stmt (&stmts, cvt);
return stmts;
@@ -5675,10 +5674,9 @@ gimple_build (gimple_seq *seq, location_t loc,
|| code == IMAGPART_EXPR
|| code == VIEW_CONVERT_EXPR)
stmt = gimple_build_assign_with_ops (code, res,
- build1 (code, type,
- op0), NULL_TREE);
+ build1 (code, type, op0));
else
- stmt = gimple_build_assign_with_ops (code, res, op0, NULL_TREE);
+ stmt = gimple_build_assign_with_ops (code, res, op0);
gimple_set_location (stmt, loc);
gimple_seq_add_stmt_without_update (seq, stmt);
}
@@ -5733,8 +5731,7 @@ gimple_build (gimple_seq *seq, location_t loc,
if (code == BIT_FIELD_REF)
stmt = gimple_build_assign_with_ops (code, res,
build3 (BIT_FIELD_REF, type,
- op0, op1, op2),
- NULL_TREE);
+ op0, op1, op2));
else
stmt = gimple_build_assign_with_ops (code, res, op0, op1, op2);
gimple_set_location (stmt, loc);
diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c
index 8187a10754c..1a4187423d5 100644
--- a/gcc/gimple-ssa-strength-reduction.c
+++ b/gcc/gimple-ssa-strength-reduction.c
@@ -3261,8 +3261,7 @@ introduce_cast_before_cand (slsr_cand_t c, tree to_type, tree from_expr)
gimple_stmt_iterator gsi = gsi_for_stmt (c->cand_stmt);
cast_lhs = make_temp_ssa_name (to_type, NULL, "slsr");
- cast_stmt = gimple_build_assign_with_ops (NOP_EXPR, cast_lhs,
- from_expr, NULL_TREE);
+ cast_stmt = gimple_build_assign_with_ops (NOP_EXPR, cast_lhs, from_expr);
gimple_set_location (cast_stmt, gimple_location (c->cand_stmt));
gsi_insert_before (&gsi, cast_stmt, GSI_SAME_STMT);
@@ -3432,8 +3431,7 @@ replace_one_candidate (slsr_cand_t c, unsigned i, tree basis_name)
{
gimple_stmt_iterator gsi = gsi_for_stmt (c->cand_stmt);
gimple cast_stmt = gimple_build_assign_with_ops (NOP_EXPR, lhs,
- basis_name,
- NULL_TREE);
+ basis_name);
gimple_set_location (cast_stmt, gimple_location (c->cand_stmt));
gsi_replace (&gsi, cast_stmt, false);
c->cand_stmt = cast_stmt;
diff --git a/gcc/gimple.c b/gcc/gimple.c
index f8459a448cb..6f21fdd034f 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -446,6 +446,14 @@ gimple_build_assign_with_ops (enum tree_code subcode, tree lhs, tree op1,
PASS_MEM_STAT);
}
+gimple
+gimple_build_assign_with_ops (enum tree_code subcode, tree lhs, tree op1
+ MEM_STAT_DECL)
+{
+ return gimple_build_assign_with_ops (subcode, lhs, op1, NULL_TREE, NULL_TREE
+ PASS_MEM_STAT);
+}
+
/* Build a GIMPLE_COND statement.
@@ -1550,7 +1558,7 @@ gimple_assign_set_rhs_from_tree (gimple_stmt_iterator *gsi, tree expr)
tree op1, op2, op3;
extract_ops_from_tree_1 (expr, &subcode, &op1, &op2, &op3);
- gimple_assign_set_rhs_with_ops_1 (gsi, subcode, op1, op2, op3);
+ gimple_assign_set_rhs_with_ops (gsi, subcode, op1, op2, op3);
}
@@ -1561,8 +1569,8 @@ gimple_assign_set_rhs_from_tree (gimple_stmt_iterator *gsi, tree expr)
did not have enough operand slots. */
void
-gimple_assign_set_rhs_with_ops_1 (gimple_stmt_iterator *gsi, enum tree_code code,
- tree op1, tree op2, tree op3)
+gimple_assign_set_rhs_with_ops (gimple_stmt_iterator *gsi, enum tree_code code,
+ tree op1, tree op2, tree op3)
{
unsigned new_rhs_ops = get_gimple_rhs_num_ops (code);
gimple stmt = gsi_stmt (*gsi);
diff --git a/gcc/gimple.h b/gcc/gimple.h
index 27bb7b6b24d..23b4b6b0623 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -1180,6 +1180,8 @@ gimple gimple_build_assign_with_ops (enum tree_code, tree,
tree, tree, tree CXX_MEM_STAT_INFO);
gimple gimple_build_assign_with_ops (enum tree_code, tree,
tree, tree CXX_MEM_STAT_INFO);
+gimple gimple_build_assign_with_ops (enum tree_code, tree,
+ tree CXX_MEM_STAT_INFO);
gimple gimple_build_cond (enum tree_code, tree, tree, tree, tree);
gimple gimple_build_cond_from_tree (tree, tree, tree);
void gimple_cond_set_condition_from_tree (gimple, tree);
@@ -1244,8 +1246,8 @@ bool gimple_assign_ssa_name_copy_p (gimple);
bool gimple_assign_unary_nop_p (gimple);
void gimple_set_bb (gimple, basic_block);
void gimple_assign_set_rhs_from_tree (gimple_stmt_iterator *, tree);
-void gimple_assign_set_rhs_with_ops_1 (gimple_stmt_iterator *, enum tree_code,
- tree, tree, tree);
+void gimple_assign_set_rhs_with_ops (gimple_stmt_iterator *, enum tree_code,
+ tree, tree, tree);
tree gimple_get_lhs (const_gimple);
void gimple_set_lhs (gimple, tree);
gimple gimple_copy (gimple);
@@ -2313,14 +2315,24 @@ gimple_assign_set_rhs3 (gimple gs, tree rhs)
gimple_set_op (gs, 3, rhs);
}
-/* A wrapper around gimple_assign_set_rhs_with_ops_1, for callers which expect
- to see only a maximum of two operands. */
+/* A wrapper around 3 operand gimple_assign_set_rhs_with_ops, for callers
+ which expect to see only two operands. */
static inline void
gimple_assign_set_rhs_with_ops (gimple_stmt_iterator *gsi, enum tree_code code,
tree op1, tree op2)
{
- gimple_assign_set_rhs_with_ops_1 (gsi, code, op1, op2, NULL);
+ gimple_assign_set_rhs_with_ops (gsi, code, op1, op2, NULL);
+}
+
+/* A wrapper around 3 operand gimple_assign_set_rhs_with_ops, for callers
+ which expect to see only one operands. */
+
+static inline void
+gimple_assign_set_rhs_with_ops (gimple_stmt_iterator *gsi, enum tree_code code,
+ tree op1)
+{
+ gimple_assign_set_rhs_with_ops (gsi, code, op1, NULL, NULL);
}
/* Returns true if GS is a nontemporal move. */
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c
index 98dbc63e2fb..6c24def1a82 100644
--- a/gcc/ipa-split.c
+++ b/gcc/ipa-split.c
@@ -1577,7 +1577,7 @@ split_function (struct split_point *split_point)
tree tem = create_tmp_reg (restype, NULL);
tem = make_ssa_name (tem, call);
cpy = gimple_build_assign_with_ops (NOP_EXPR, retval,
- tem, NULL_TREE);
+ tem);
gsi_insert_after (&gsi, cpy, GSI_NEW_STMT);
retval = tem;
}
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index ddb720c4a7f..ef217c1e003 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -3841,8 +3841,7 @@ lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist,
OMP_CLAUSE_CHAIN (c) = gimple_omp_for_clauses (ctx->stmt);
gimple_omp_for_set_clauses (ctx->stmt, c);
g = gimple_build_assign_with_ops (INTEGER_CST, lane,
- build_int_cst (unsigned_type_node, 0),
- NULL_TREE);
+ build_int_cst (unsigned_type_node, 0));
gimple_seq_add_stmt (ilist, g);
for (int i = 0; i < 2; i++)
if (llist[i])
@@ -3853,7 +3852,7 @@ lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist,
gimple_seq *seq = i == 0 ? ilist : dlist;
gimple_seq_add_stmt (seq, g);
tree t = build_int_cst (unsigned_type_node, 0);
- g = gimple_build_assign_with_ops (INTEGER_CST, idx, t, NULL_TREE);
+ g = gimple_build_assign_with_ops (INTEGER_CST, idx, t);
gimple_seq_add_stmt (seq, g);
tree body = create_artificial_label (UNKNOWN_LOCATION);
tree header = create_artificial_label (UNKNOWN_LOCATION);
@@ -5847,8 +5846,7 @@ expand_omp_for_generic (struct omp_region *region,
if (useless_type_conversion_p (TREE_TYPE (fd->loop.v), TREE_TYPE (iend)))
stmt = gimple_build_assign (fd->loop.v, iend);
else
- stmt = gimple_build_assign_with_ops (NOP_EXPR, fd->loop.v, iend,
- NULL_TREE);
+ stmt = gimple_build_assign_with_ops (NOP_EXPR, fd->loop.v, iend);
gsi_insert_after (&gsi, stmt, GSI_CONTINUE_LINKING);
}
if (fd->collapse > 1)
@@ -6268,8 +6266,7 @@ expand_omp_for_static_nochunk (struct omp_region *region,
if (useless_type_conversion_p (TREE_TYPE (fd->loop.v), TREE_TYPE (e)))
stmt = gimple_build_assign (fd->loop.v, e);
else
- stmt = gimple_build_assign_with_ops (NOP_EXPR, fd->loop.v, e,
- NULL_TREE);
+ stmt = gimple_build_assign_with_ops (NOP_EXPR, fd->loop.v, e);
gsi_insert_after (&gsi, stmt, GSI_CONTINUE_LINKING);
}
if (fd->collapse > 1)
@@ -6659,8 +6656,7 @@ expand_omp_for_static_chunk (struct omp_region *region,
if (useless_type_conversion_p (TREE_TYPE (fd->loop.v), TREE_TYPE (e)))
stmt = gimple_build_assign (fd->loop.v, e);
else
- stmt = gimple_build_assign_with_ops (NOP_EXPR, fd->loop.v, e,
- NULL_TREE);
+ stmt = gimple_build_assign_with_ops (NOP_EXPR, fd->loop.v, e);
gsi_insert_after (&gsi, stmt, GSI_CONTINUE_LINKING);
}
if (fd->collapse > 1)
@@ -12203,8 +12199,7 @@ simd_clone_adjust (struct cgraph_node *node)
{
t = make_ssa_name (orig_arg, NULL);
g = gimple_build_assign_with_ops (NOP_EXPR, t,
- gimple_call_lhs (g),
- NULL_TREE);
+ gimple_call_lhs (g));
gimple_seq_add_stmt_without_update (&seq, g);
}
gsi_insert_seq_on_edge_immediate
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index b5a34caef41..39a4a66fcc6 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -821,9 +821,8 @@ generate_memset_builtin (struct loop *loop, partition_t partition)
val = fold_convert (integer_type_node, val);
else if (!useless_type_conversion_p (integer_type_node, TREE_TYPE (val)))
{
- gimple cstmt;
tree tem = make_ssa_name (integer_type_node, NULL);
- cstmt = gimple_build_assign_with_ops (NOP_EXPR, tem, val, NULL_TREE);
+ gimple cstmt = gimple_build_assign_with_ops (NOP_EXPR, tem, val);
gsi_insert_after (&gsi, cstmt, GSI_CONTINUE_LINKING);
val = tem;
}
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
index 5b8c10e8f8e..3b8822f2e6d 100644
--- a/gcc/tree-ssa-forwprop.c
+++ b/gcc/tree-ssa-forwprop.c
@@ -757,10 +757,9 @@ forward_propagate_addr_expr_1 (tree name, tree def_rhs,
if (useless_type_conversion_p (TREE_TYPE (lhs), TREE_TYPE (new_def_rhs)))
gimple_assign_set_rhs_with_ops (use_stmt_gsi, TREE_CODE (new_def_rhs),
- new_def_rhs, NULL_TREE);
+ new_def_rhs);
else if (is_gimple_min_invariant (new_def_rhs))
- gimple_assign_set_rhs_with_ops (use_stmt_gsi, NOP_EXPR,
- new_def_rhs, NULL_TREE);
+ gimple_assign_set_rhs_with_ops (use_stmt_gsi, NOP_EXPR, new_def_rhs);
else
return false;
gcc_assert (gsi_stmt (*use_stmt_gsi) == use_stmt);
@@ -1725,8 +1724,7 @@ simplify_rotate (gimple_stmt_iterator *gsi)
{
g = gimple_build_assign_with_ops (NOP_EXPR,
make_ssa_name (TREE_TYPE (def_arg2[0]),
- NULL),
- rotcnt, NULL_TREE);
+ NULL), rotcnt);
gsi_insert_before (gsi, g, GSI_SAME_STMT);
rotcnt = gimple_assign_lhs (g);
}
@@ -1740,7 +1738,7 @@ simplify_rotate (gimple_stmt_iterator *gsi)
{
gsi_insert_before (gsi, g, GSI_SAME_STMT);
g = gimple_build_assign_with_ops (NOP_EXPR, gimple_assign_lhs (stmt),
- lhs, NULL_TREE);
+ lhs);
}
gsi_replace (gsi, g, false);
return true;
@@ -2055,7 +2053,7 @@ simplify_vector_constructor (gimple_stmt_iterator *gsi)
for (i = 0; i < nelts; i++)
mask_elts[i] = build_int_cst (TREE_TYPE (mask_type), sel[i]);
op2 = build_vector (mask_type, mask_elts);
- gimple_assign_set_rhs_with_ops_1 (gsi, VEC_PERM_EXPR, orig, orig, op2);
+ gimple_assign_set_rhs_with_ops (gsi, VEC_PERM_EXPR, orig, orig, op2);
}
update_stmt (gsi_stmt (*gsi));
return true;
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c
index 85d811868b7..7f7f3528c14 100644
--- a/gcc/tree-ssa-loop-im.c
+++ b/gcc/tree-ssa-loop-im.c
@@ -1211,7 +1211,7 @@ move_computations_dom_walker::before_dom_children (basic_block bb)
tree arg = PHI_ARG_DEF (stmt, 0);
new_stmt = gimple_build_assign_with_ops (TREE_CODE (arg),
gimple_phi_result (stmt),
- arg, NULL_TREE);
+ arg);
}
else
{
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c
index aab056c338e..2621534f4f4 100644
--- a/gcc/tree-ssa-math-opts.c
+++ b/gcc/tree-ssa-math-opts.c
@@ -1129,7 +1129,7 @@ build_and_insert_cast (gimple_stmt_iterator *gsi, location_t loc,
tree type, tree val)
{
tree result = make_ssa_name (type, NULL);
- gimple stmt = gimple_build_assign_with_ops (NOP_EXPR, result, val, NULL_TREE);
+ gimple stmt = gimple_build_assign_with_ops (NOP_EXPR, result, val);
gimple_set_location (stmt, loc);
gsi_insert_before (gsi, stmt, GSI_SAME_STMT);
return result;
@@ -2259,13 +2259,11 @@ bswap_replace (gimple cur_stmt, gimple src_stmt, tree fndecl, tree bswap_type,
load_stmt = gimple_build_assign (val_tmp, val_expr);
gimple_set_vuse (load_stmt, n->vuse);
gsi_insert_before (&gsi, load_stmt, GSI_SAME_STMT);
- gimple_assign_set_rhs_with_ops_1 (&gsi, NOP_EXPR, val_tmp,
- NULL_TREE, NULL_TREE);
+ gimple_assign_set_rhs_with_ops (&gsi, NOP_EXPR, val_tmp);
}
else
{
- gimple_assign_set_rhs_with_ops_1 (&gsi, MEM_REF, val_expr,
- NULL_TREE, NULL_TREE);
+ gimple_assign_set_rhs_with_ops (&gsi, MEM_REF, val_expr);
gimple_set_vuse (cur_stmt, n->vuse);
}
update_stmt (cur_stmt);
@@ -2319,8 +2317,7 @@ bswap_replace (gimple cur_stmt, gimple src_stmt, tree fndecl, tree bswap_type,
{
gimple convert_stmt;
tmp = make_temp_ssa_name (bswap_type, NULL, "bswapsrc");
- convert_stmt = gimple_build_assign_with_ops (NOP_EXPR, tmp, src,
- NULL);
+ convert_stmt = gimple_build_assign_with_ops (NOP_EXPR, tmp, src);
gsi_insert_before (&gsi, convert_stmt, GSI_SAME_STMT);
}
@@ -2334,7 +2331,7 @@ bswap_replace (gimple cur_stmt, gimple src_stmt, tree fndecl, tree bswap_type,
{
gimple convert_stmt;
tmp = make_temp_ssa_name (bswap_type, NULL, "bswapdst");
- convert_stmt = gimple_build_assign_with_ops (NOP_EXPR, tgt, tmp, NULL);
+ convert_stmt = gimple_build_assign_with_ops (NOP_EXPR, tgt, tmp);
gsi_insert_after (&gsi, convert_stmt, GSI_SAME_STMT);
}
@@ -2973,8 +2970,8 @@ convert_plusminus_to_widen (gimple_stmt_iterator *gsi, gimple stmt,
if (TREE_CODE (mult_rhs2) == INTEGER_CST)
mult_rhs2 = fold_convert (type2, mult_rhs2);
- gimple_assign_set_rhs_with_ops_1 (gsi, wmult_code, mult_rhs1, mult_rhs2,
- add_rhs);
+ gimple_assign_set_rhs_with_ops (gsi, wmult_code, mult_rhs1, mult_rhs2,
+ add_rhs);
update_stmt (gsi_stmt (*gsi));
widen_mul_stats.maccs_inserted++;
return true;
@@ -3177,8 +3174,7 @@ convert_mult_to_fma (gimple mul_stmt, tree op1, tree op2)
fma_stmt = gimple_build_assign_with_ops (FMA_EXPR,
gimple_assign_lhs (use_stmt),
- mulop1, op2,
- addop);
+ mulop1, op2, addop);
gsi_replace (&gsi, fma_stmt, true);
widen_mul_stats.fmas_inserted++;
}
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c
index c7c839d29ac..561490c3b10 100644
--- a/gcc/tree-ssa-phiopt.c
+++ b/gcc/tree-ssa-phiopt.c
@@ -536,7 +536,7 @@ conditional_replacement (basic_block cond_bb, basic_block middle_bb,
new_var2 = make_ssa_name (TREE_TYPE (result), NULL);
new_stmt = gimple_build_assign_with_ops (CONVERT_EXPR, new_var2,
- new_var, NULL);
+ new_var);
gsi_insert_before (&gsi, new_stmt, GSI_SAME_STMT);
new_var = new_var2;
@@ -1254,7 +1254,7 @@ abs_replacement (basic_block cond_bb, basic_block middle_bb,
lhs = result;
/* Build the modify expression with abs expression. */
- new_stmt = gimple_build_assign_with_ops (ABS_EXPR, lhs, rhs, NULL);
+ new_stmt = gimple_build_assign_with_ops (ABS_EXPR, lhs, rhs);
gsi = gsi_last_bb (cond_bb);
gsi_insert_before (&gsi, new_stmt, GSI_NEW_STMT);
@@ -1264,7 +1264,7 @@ abs_replacement (basic_block cond_bb, basic_block middle_bb,
/* Get the right GSI. We want to insert after the recently
added ABS_EXPR statement (which we know is the first statement
in the block. */
- new_stmt = gimple_build_assign_with_ops (NEGATE_EXPR, result, lhs, NULL);
+ new_stmt = gimple_build_assign_with_ops (NEGATE_EXPR, result, lhs);
gsi_insert_after (&gsi, new_stmt, GSI_NEW_STMT);
}
@@ -1388,12 +1388,12 @@ neg_replacement (basic_block cond_bb, basic_block middle_bb,
logical and arithmetic operations on it. */
tree cond_val_converted = make_ssa_name (TREE_TYPE (rhs), NULL);
new_stmt = gimple_build_assign_with_ops (NOP_EXPR, cond_val_converted,
- cond_val, NULL_TREE);
+ cond_val);
gsi_insert_after (&gsi, new_stmt, GSI_NEW_STMT);
tree neg_cond_val_converted = make_ssa_name (TREE_TYPE (rhs), NULL);
new_stmt = gimple_build_assign_with_ops (NEGATE_EXPR, neg_cond_val_converted,
- cond_val_converted, NULL_TREE);
+ cond_val_converted);
gsi_insert_after (&gsi, new_stmt, GSI_NEW_STMT);
tree tmp = make_ssa_name (TREE_TYPE (rhs), NULL);
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index 748249d7513..1438db84d5b 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
@@ -3307,7 +3307,7 @@ maybe_optimize_range_tests (gimple stmt)
}
else
g = gimple_build_assign_with_ops (rhs_code, new_lhs,
- new_op, NULL_TREE);
+ new_op);
gimple_stmt_iterator gsi = gsi_for_stmt (cast_stmt);
gimple_set_uid (g, gimple_uid (cast_stmt));
gimple_set_visited (g, true);
@@ -4214,10 +4214,11 @@ repropagate_negates (void)
tree b = gimple_assign_rhs2 (user);
gimple_stmt_iterator gsi = gsi_for_stmt (feed);
gimple_stmt_iterator gsi2 = gsi_for_stmt (user);
- tree x = make_ssa_name (TREE_TYPE (gimple_assign_lhs (feed)), NULL);
+ tree x = make_ssa_name (TREE_TYPE (gimple_assign_lhs (feed)),
+ NULL);
gimple g = gimple_build_assign_with_ops (PLUS_EXPR, x, a, b);
gsi_insert_before (&gsi2, g, GSI_SAME_STMT);
- gimple_assign_set_rhs_with_ops (&gsi2, NEGATE_EXPR, x, NULL);
+ gimple_assign_set_rhs_with_ops (&gsi2, NEGATE_EXPR, x);
user = gsi_stmt (gsi2);
update_stmt (user);
reassoc_remove_stmt (&gsi);
diff --git a/gcc/tree-ssa-strlen.c b/gcc/tree-ssa-strlen.c
index c327f89dada..98a1b240652 100644
--- a/gcc/tree-ssa-strlen.c
+++ b/gcc/tree-ssa-strlen.c
@@ -1816,7 +1816,7 @@ handle_pointer_plus (gimple_stmt_iterator *gsi)
enum tree_code rhs_code
= useless_type_conversion_p (TREE_TYPE (lhs), TREE_TYPE (si->endptr))
? SSA_NAME : NOP_EXPR;
- gimple_assign_set_rhs_with_ops (gsi, rhs_code, si->endptr, NULL_TREE);
+ gimple_assign_set_rhs_with_ops (gsi, rhs_code, si->endptr);
gcc_assert (gsi_stmt (*gsi) == stmt);
update_stmt (stmt);
}
diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c
index b68ea2fadef..543f1b4c2cd 100644
--- a/gcc/tree-vect-loop-manip.c
+++ b/gcc/tree-vect-loop-manip.c
@@ -2157,7 +2157,7 @@ vect_create_cond_for_align_checks (loop_vec_info loop_vinfo,
sprintf (tmp_name, "addr2int%d", i);
addr_tmp_name = make_temp_ssa_name (int_ptrsize_type, NULL, tmp_name);
addr_stmt = gimple_build_assign_with_ops (NOP_EXPR, addr_tmp_name,
- addr_base, NULL_TREE);
+ addr_base);
gimple_seq_add_stmt (cond_expr_stmt_list, addr_stmt);
/* The addresses are OR together. */
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 70405d86f34..8861fbb6898 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -2501,7 +2501,7 @@ vect_is_simple_reduction_1 (loop_vec_info loop_info, gimple phi,
tree rhs = gimple_assign_rhs2 (def_stmt);
tree negrhs = make_ssa_name (TREE_TYPE (rhs), NULL);
gimple negate_stmt = gimple_build_assign_with_ops (NEGATE_EXPR, negrhs,
- rhs, NULL);
+ rhs);
gimple_stmt_iterator gsi = gsi_for_stmt (def_stmt);
set_vinfo_for_stmt (negate_stmt, new_stmt_vec_info (negate_stmt,
loop_info, NULL));
@@ -3379,7 +3379,7 @@ get_initial_def_for_induction (gimple iv_phi)
new_stmt = gimple_build_assign_with_ops
(VIEW_CONVERT_EXPR,
vect_get_new_vect_var (vectype, vect_simple_var, "vec_iv_"),
- build1 (VIEW_CONVERT_EXPR, vectype, vec_init), NULL_TREE);
+ build1 (VIEW_CONVERT_EXPR, vectype, vec_init));
vec_init = make_ssa_name (gimple_assign_lhs (new_stmt), new_stmt);
gimple_assign_set_lhs (new_stmt, vec_init);
new_bb = gsi_insert_on_edge_immediate (loop_preheader_edge (iv_loop),
@@ -3555,7 +3555,7 @@ get_initial_def_for_induction (gimple iv_phi)
vect_get_new_vect_var (resvectype, vect_simple_var,
"vec_iv_"),
build1 (VIEW_CONVERT_EXPR, resvectype,
- gimple_assign_lhs (new_stmt)), NULL_TREE);
+ gimple_assign_lhs (new_stmt)));
gimple_assign_set_lhs (new_stmt,
make_ssa_name
(gimple_assign_lhs (new_stmt), new_stmt));
@@ -3622,7 +3622,7 @@ get_initial_def_for_induction (gimple iv_phi)
new_stmt = gimple_build_assign_with_ops
(VIEW_CONVERT_EXPR,
vect_get_new_vect_var (resvectype, vect_simple_var, "vec_iv_"),
- build1 (VIEW_CONVERT_EXPR, resvectype, induc_def), NULL_TREE);
+ build1 (VIEW_CONVERT_EXPR, resvectype, induc_def));
induc_def = make_ssa_name (gimple_assign_lhs (new_stmt), new_stmt);
gimple_assign_set_lhs (new_stmt, induc_def);
si = gsi_after_labels (bb);
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c
index 24ebba2381b..5def606b60f 100644
--- a/gcc/tree-vect-patterns.c
+++ b/gcc/tree-vect-patterns.c
@@ -760,8 +760,7 @@ vect_handle_widen_op_by_const (gimple stmt, enum tree_code code,
/* Create a_T = (NEW_TYPE) a_t; */
*oprnd = gimple_assign_rhs1 (def_stmt);
new_oprnd = make_ssa_name (new_type, NULL);
- new_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd, *oprnd,
- NULL_TREE);
+ 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);
*oprnd = new_oprnd;
@@ -935,7 +934,7 @@ vect_recog_widen_mult_pattern (vec<gimple> *stmts,
tree old_oprnd = gimple_assign_rhs1 (def_stmt);
tree new_oprnd = make_ssa_name (half_type0, NULL);
new_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd,
- old_oprnd, NULL_TREE);
+ old_oprnd);
*oprnd = new_oprnd;
}
@@ -1032,8 +1031,7 @@ vect_recog_widen_mult_pattern (vec<gimple> *stmts,
pattern_stmt
= gimple_build_assign_with_ops (NOP_EXPR,
vect_recog_temp_ssa_var (type, NULL),
- gimple_assign_lhs (pattern_stmt),
- NULL_TREE);
+ gimple_assign_lhs (pattern_stmt));
}
if (dump_enabled_p ())
@@ -1443,7 +1441,7 @@ vect_operation_fits_smaller_type (gimple stmt, tree def, tree *new_type,
oprnd = gimple_assign_rhs1 (def_stmt);
new_oprnd = make_ssa_name (interm_type, NULL);
new_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd,
- oprnd, NULL_TREE);
+ oprnd);
STMT_VINFO_RELATED_STMT (vinfo_for_stmt (def_stmt)) = new_stmt;
stmts->safe_push (def_stmt);
oprnd = new_oprnd;
@@ -1462,7 +1460,7 @@ vect_operation_fits_smaller_type (gimple stmt, tree def, tree *new_type,
/* Create a type conversion HALF_TYPE->INTERM_TYPE. */
new_oprnd = make_ssa_name (interm_type, NULL);
new_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd,
- oprnd, NULL_TREE);
+ oprnd);
oprnd = new_oprnd;
*new_def_stmt = new_stmt;
}
@@ -1594,7 +1592,7 @@ vect_recog_over_widening_pattern (vec<gimple> *stmts,
/* Create NEW_TYPE->USE_TYPE conversion. */
new_oprnd = make_ssa_name (use_type, NULL);
pattern_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd,
- var, NULL_TREE);
+ var);
STMT_VINFO_RELATED_STMT (vinfo_for_stmt (use_stmt)) = pattern_stmt;
*type_in = get_vectype_for_scalar_type (new_type);
@@ -1946,8 +1944,7 @@ vect_recog_rotate_pattern (vec<gimple> *stmts, tree *type_in, tree *type_out)
if (def == NULL_TREE)
{
def = vect_recog_temp_ssa_var (type, NULL);
- def_stmt = gimple_build_assign_with_ops (NOP_EXPR, def, oprnd1,
- NULL_TREE);
+ def_stmt = gimple_build_assign_with_ops (NOP_EXPR, def, oprnd1);
if (ext_def)
{
basic_block new_bb
@@ -1977,8 +1974,7 @@ vect_recog_rotate_pattern (vec<gimple> *stmts, tree *type_in, tree *type_out)
if (vecstype == NULL_TREE)
return NULL;
def2 = vect_recog_temp_ssa_var (stype, NULL);
- def_stmt = gimple_build_assign_with_ops (NEGATE_EXPR, def2, def,
- NULL_TREE);
+ def_stmt = gimple_build_assign_with_ops (NEGATE_EXPR, def2, def);
if (ext_def)
{
basic_block new_bb
@@ -2151,8 +2147,7 @@ vect_recog_vector_vector_shift_pattern (vec<gimple> *stmts,
if (def == NULL_TREE)
{
def = vect_recog_temp_ssa_var (TREE_TYPE (oprnd0), NULL);
- def_stmt = gimple_build_assign_with_ops (NOP_EXPR, def, oprnd1,
- NULL_TREE);
+ def_stmt = gimple_build_assign_with_ops (NOP_EXPR, def, oprnd1);
new_pattern_def_seq (stmt_vinfo, def_stmt);
}
@@ -2350,8 +2345,7 @@ vect_recog_divmod_pattern (vec<gimple> *stmts,
append_pattern_def_seq (stmt_vinfo, def_stmt);
signmask = vect_recog_temp_ssa_var (itype, NULL);
def_stmt
- = gimple_build_assign_with_ops (NOP_EXPR, signmask, var,
- NULL_TREE);
+ = gimple_build_assign_with_ops (NOP_EXPR, signmask, var);
append_pattern_def_seq (stmt_vinfo, def_stmt);
}
def_stmt
@@ -2613,8 +2607,7 @@ vect_recog_divmod_pattern (vec<gimple> *stmts,
if (msb != 1)
def_stmt
= gimple_build_assign_with_ops (INTEGER_CST,
- t4, build_int_cst (itype, msb),
- NULL_TREE);
+ t4, build_int_cst (itype, msb));
else
def_stmt
= gimple_build_assign_with_ops (RSHIFT_EXPR, t4, oprnd0,
@@ -2809,7 +2802,7 @@ vect_recog_mixed_size_cond_pattern (vec<gimple> *stmts, tree *type_in,
pattern_stmt
= gimple_build_assign_with_ops (NOP_EXPR,
vect_recog_temp_ssa_var (type, NULL),
- gimple_assign_lhs (def_stmt), NULL_TREE);
+ gimple_assign_lhs (def_stmt));
new_pattern_def_seq (stmt_vinfo, def_stmt);
def_stmt_info = new_stmt_vec_info (def_stmt, loop_vinfo, bb_vinfo);
@@ -2923,8 +2916,7 @@ adjust_bool_pattern_cast (tree type, tree var)
cast_stmt
= gimple_build_assign_with_ops (NOP_EXPR,
vect_recog_temp_ssa_var (type, NULL),
- gimple_assign_lhs (pattern_stmt),
- NULL_TREE);
+ gimple_assign_lhs (pattern_stmt));
STMT_VINFO_RELATED_STMT (stmt_vinfo) = cast_stmt;
return gimple_assign_lhs (cast_stmt);
}
@@ -2961,7 +2953,7 @@ adjust_bool_pattern (tree var, tree out_type, tree trueval,
pattern_stmt
= gimple_build_assign_with_ops (SSA_NAME,
vect_recog_temp_ssa_var (itype, NULL),
- irhs1, NULL_TREE);
+ irhs1);
break;
case BIT_NOT_EXPR:
@@ -3209,10 +3201,10 @@ vect_recog_bool_pattern (vec<gimple> *stmts, tree *type_in,
lhs = vect_recog_temp_ssa_var (TREE_TYPE (lhs), NULL);
if (useless_type_conversion_p (TREE_TYPE (lhs), TREE_TYPE (rhs)))
pattern_stmt
- = gimple_build_assign_with_ops (SSA_NAME, lhs, rhs, NULL_TREE);
+ = gimple_build_assign_with_ops (SSA_NAME, lhs, rhs);
else
pattern_stmt
- = gimple_build_assign_with_ops (NOP_EXPR, lhs, rhs, NULL_TREE);
+ = gimple_build_assign_with_ops (NOP_EXPR, lhs, rhs);
*type_out = vectype;
*type_in = vectype;
stmts->safe_push (last_stmt);
@@ -3278,12 +3270,12 @@ vect_recog_bool_pattern (vec<gimple> *stmts, tree *type_in,
{
tree rhs2 = vect_recog_temp_ssa_var (TREE_TYPE (lhs), NULL);
gimple cast_stmt
- = gimple_build_assign_with_ops (NOP_EXPR, rhs2, rhs, NULL_TREE);
+ = gimple_build_assign_with_ops (NOP_EXPR, rhs2, rhs);
new_pattern_def_seq (stmt_vinfo, cast_stmt);
rhs = rhs2;
}
pattern_stmt
- = gimple_build_assign_with_ops (SSA_NAME, lhs, rhs, NULL_TREE);
+ = gimple_build_assign_with_ops (SSA_NAME, lhs, rhs);
pattern_stmt_info = new_stmt_vec_info (pattern_stmt, loop_vinfo,
bb_vinfo);
set_vinfo_for_stmt (pattern_stmt, pattern_stmt_info);
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index de62c6d0c37..2d680eb0df2 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -2609,7 +2609,7 @@ vect_get_constant_vectors (tree op, slp_tree slp_node,
op);
init_stmt
= gimple_build_assign_with_ops (VIEW_CONVERT_EXPR,
- new_temp, op, NULL_TREE);
+ new_temp, op);
gimple_seq_add_stmt (&ctor_seq, init_stmt);
op = new_temp;
}
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index e9859f7d8e5..198d4698928 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -1333,8 +1333,7 @@ vect_init_vector (gimple stmt, tree val, tree type, gimple_stmt_iterator *gsi)
{
new_temp = make_ssa_name (TREE_TYPE (type), NULL);
init_stmt = gimple_build_assign_with_ops (NOP_EXPR,
- new_temp, val,
- NULL_TREE);
+ new_temp, val);
vect_init_vector_1 (stmt, init_stmt, gsi);
val = new_temp;
}
@@ -1970,8 +1969,7 @@ vectorizable_mask_load_store (gimple stmt, gimple_stmt_iterator *gsi,
var = make_ssa_name (var, NULL);
op = build1 (VIEW_CONVERT_EXPR, idxtype, op);
new_stmt
- = gimple_build_assign_with_ops (VIEW_CONVERT_EXPR, var,
- op, NULL_TREE);
+ = gimple_build_assign_with_ops (VIEW_CONVERT_EXPR, var, op);
vect_finish_stmt_generation (stmt, new_stmt, gsi);
op = var;
}
@@ -2001,7 +1999,7 @@ vectorizable_mask_load_store (gimple stmt, gimple_stmt_iterator *gsi,
mask_op = build1 (VIEW_CONVERT_EXPR, masktype, mask_op);
new_stmt
= gimple_build_assign_with_ops (VIEW_CONVERT_EXPR, var,
- mask_op, NULL_TREE);
+ mask_op);
vect_finish_stmt_generation (stmt, new_stmt, gsi);
mask_op = var;
}
@@ -2022,8 +2020,7 @@ vectorizable_mask_load_store (gimple stmt, gimple_stmt_iterator *gsi,
var = make_ssa_name (vec_dest, NULL);
op = build1 (VIEW_CONVERT_EXPR, vectype, op);
new_stmt
- = gimple_build_assign_with_ops (VIEW_CONVERT_EXPR, var, op,
- NULL_TREE);
+ = gimple_build_assign_with_ops (VIEW_CONVERT_EXPR, var, op);
}
else
{
@@ -3790,7 +3787,7 @@ vectorizable_conversion (gimple stmt, gimple_stmt_iterator *gsi,
{
gcc_assert (TREE_CODE_LENGTH (code1) == unary_op);
new_stmt = gimple_build_assign_with_ops (code1, vec_dest,
- vop0, NULL);
+ vop0);
new_temp = make_ssa_name (vec_dest, new_stmt);
gimple_assign_set_lhs (new_stmt, new_temp);
}
@@ -3902,8 +3899,7 @@ vectorizable_conversion (gimple stmt, gimple_stmt_iterator *gsi,
gcc_assert (TREE_CODE_LENGTH (codecvt1) == unary_op);
new_temp = make_ssa_name (vec_dest, NULL);
new_stmt = gimple_build_assign_with_ops (codecvt1,
- new_temp,
- vop0, NULL);
+ new_temp, vop0);
}
vect_finish_stmt_generation (stmt, new_stmt, gsi);
@@ -3960,7 +3956,7 @@ vectorizable_conversion (gimple stmt, gimple_stmt_iterator *gsi,
gcc_assert (TREE_CODE_LENGTH (codecvt1) == unary_op);
new_temp = make_ssa_name (vec_dest, NULL);
new_stmt = gimple_build_assign_with_ops (codecvt1, new_temp,
- vop0, NULL);
+ vop0);
}
vect_finish_stmt_generation (stmt, new_stmt, gsi);
@@ -5958,8 +5954,7 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
var = make_ssa_name (var, NULL);
op = build1 (VIEW_CONVERT_EXPR, idxtype, op);
new_stmt
- = gimple_build_assign_with_ops (VIEW_CONVERT_EXPR, var,
- op, NULL_TREE);
+ = gimple_build_assign_with_ops (VIEW_CONVERT_EXPR, var, op);
vect_finish_stmt_generation (stmt, new_stmt, gsi);
op = var;
}
@@ -5978,8 +5973,7 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
var = make_ssa_name (vec_dest, NULL);
op = build1 (VIEW_CONVERT_EXPR, vectype, op);
new_stmt
- = gimple_build_assign_with_ops (VIEW_CONVERT_EXPR, var, op,
- NULL_TREE);
+ = gimple_build_assign_with_ops (VIEW_CONVERT_EXPR, var, op);
}
else
{
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 13b7c791eea..230ce8c6500 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -8879,15 +8879,14 @@ simplify_truth_ops_using_ranges (gimple_stmt_iterator *gsi, gimple stmt)
if (integer_zerop (op1))
gimple_assign_set_rhs_with_ops (gsi,
need_conversion
- ? NOP_EXPR : TREE_CODE (op0),
- op0, NULL_TREE);
+ ? NOP_EXPR : TREE_CODE (op0), op0);
/* For A != B we substitute A ^ B. Either with conversion. */
else if (need_conversion)
{
tree tem = make_ssa_name (TREE_TYPE (op0), NULL);
gimple newop = gimple_build_assign_with_ops (BIT_XOR_EXPR, tem, op0, op1);
gsi_insert_before (gsi, newop, GSI_SAME_STMT);
- gimple_assign_set_rhs_with_ops (gsi, NOP_EXPR, tem, NULL_TREE);
+ gimple_assign_set_rhs_with_ops (gsi, NOP_EXPR, tem);
}
/* Or without. */
else
@@ -9107,7 +9106,7 @@ simplify_bit_ops_using_ranges (gimple_stmt_iterator *gsi, gimple stmt)
if (op == NULL_TREE)
return false;
- gimple_assign_set_rhs_with_ops (gsi, TREE_CODE (op), op, NULL);
+ gimple_assign_set_rhs_with_ops (gsi, TREE_CODE (op), op);
update_stmt (gsi_stmt (*gsi));
return true;
}
@@ -9611,7 +9610,7 @@ simplify_float_conversion_using_ranges (gimple_stmt_iterator *gsi, gimple stmt)
float conversion. */
tem = make_ssa_name (build_nonstandard_integer_type
(GET_MODE_PRECISION (mode), 0), NULL);
- conv = gimple_build_assign_with_ops (NOP_EXPR, tem, rhs1, NULL_TREE);
+ conv = gimple_build_assign_with_ops (NOP_EXPR, tem, rhs1);
gsi_insert_before (gsi, conv, GSI_SAME_STMT);
gimple_assign_set_rhs1 (stmt, tem);
update_stmt (stmt);
@@ -9685,8 +9684,7 @@ simplify_internal_call_using_ranges (gimple_stmt_iterator *gsi, gimple stmt)
else if (!useless_type_conversion_p (utype, TREE_TYPE (op0)))
{
g = gimple_build_assign_with_ops (NOP_EXPR,
- make_ssa_name (utype, NULL),
- op0, NULL_TREE);
+ make_ssa_name (utype, NULL), op0);
gimple_set_location (g, loc);
gsi_insert_before (gsi, g, GSI_SAME_STMT);
op0 = gimple_assign_lhs (g);
@@ -9696,8 +9694,7 @@ simplify_internal_call_using_ranges (gimple_stmt_iterator *gsi, gimple stmt)
else if (!useless_type_conversion_p (utype, TREE_TYPE (op1)))
{
g = gimple_build_assign_with_ops (NOP_EXPR,
- make_ssa_name (utype, NULL),
- op1, NULL_TREE);
+ make_ssa_name (utype, NULL), op1);
gimple_set_location (g, loc);
gsi_insert_before (gsi, g, GSI_SAME_STMT);
op1 = gimple_assign_lhs (g);
@@ -9710,7 +9707,7 @@ simplify_internal_call_using_ranges (gimple_stmt_iterator *gsi, gimple stmt)
{
g = gimple_build_assign_with_ops (NOP_EXPR,
make_ssa_name (type, NULL),
- gimple_assign_lhs (g), NULL_TREE);
+ gimple_assign_lhs (g));
gimple_set_location (g, loc);
gsi_insert_before (gsi, g, GSI_SAME_STMT);
}
diff --git a/gcc/tsan.c b/gcc/tsan.c
index 53f30a1b833..763f57383be 100644
--- a/gcc/tsan.c
+++ b/gcc/tsan.c
@@ -501,8 +501,7 @@ instrument_builtin_call (gimple_stmt_iterator *gsi)
TREE_TYPE (args[1])))
{
tree var = make_ssa_name (TREE_TYPE (lhs), NULL);
- g = gimple_build_assign_with_ops (NOP_EXPR, var,
- args[1], NULL_TREE);
+ g = gimple_build_assign_with_ops (NOP_EXPR, var, args[1]);
gsi_insert_after (gsi, g, GSI_NEW_STMT);
args[1] = var;
}
@@ -516,8 +515,7 @@ instrument_builtin_call (gimple_stmt_iterator *gsi)
gimple_call_lhs (stmt),
args[1]);
gsi_insert_after (gsi, g, GSI_NEW_STMT);
- g = gimple_build_assign_with_ops (BIT_NOT_EXPR, lhs, var,
- NULL_TREE);
+ g = gimple_build_assign_with_ops (BIT_NOT_EXPR, lhs, var);
}
else
g = gimple_build_assign_with_ops (tsan_atomic_table[i].code,
@@ -560,7 +558,7 @@ instrument_builtin_call (gimple_stmt_iterator *gsi)
g = gimple_build_assign_with_ops (NOP_EXPR,
make_ssa_name (TREE_TYPE (t),
NULL),
- args[1], NULL_TREE);
+ args[1]);
gsi_insert_before (gsi, g, GSI_SAME_STMT);
args[1] = gimple_assign_lhs (g);
}
diff --git a/gcc/ubsan.c b/gcc/ubsan.c
index ad5665ff047..16f94e22982 100644
--- a/gcc/ubsan.c
+++ b/gcc/ubsan.c
@@ -736,8 +736,7 @@ ubsan_expand_null_ifn (gimple_stmt_iterator *gsip)
if (compare_tree_int (align, ptralign) == 1)
{
check_align = make_ssa_name (pointer_sized_int_node, NULL);
- g = gimple_build_assign_with_ops (NOP_EXPR, check_align,
- ptr, NULL_TREE);
+ g = gimple_build_assign_with_ops (NOP_EXPR, check_align, ptr);
gimple_set_location (g, loc);
gsi_insert_before (&gsi, g, GSI_SAME_STMT);
}
@@ -934,7 +933,7 @@ ubsan_expand_objsize_ifn (gimple_stmt_iterator *gsi)
? BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH
: BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_ABORT;
tree p = make_ssa_name (pointer_sized_int_node, NULL);
- g = gimple_build_assign_with_ops (NOP_EXPR, p, ptr, NULL_TREE);
+ g = gimple_build_assign_with_ops (NOP_EXPR, p, ptr);
gimple_set_location (g, loc);
gsi_insert_before (gsi, g, GSI_SAME_STMT);
g = gimple_build_call (builtin_decl_explicit (bcode), 2, data, p);
@@ -1175,7 +1174,7 @@ instrument_bool_enum_load (gimple_stmt_iterator *gsi)
if (can_throw)
{
gimple_assign_set_lhs (stmt, urhs);
- g = gimple_build_assign_with_ops (NOP_EXPR, lhs, urhs, NULL_TREE);
+ g = gimple_build_assign_with_ops (NOP_EXPR, lhs, urhs);
gimple_set_location (g, loc);
edge e = find_fallthru_edge (gimple_bb (stmt)->succs);
gsi_insert_on_edge_immediate (e, g);
@@ -1213,7 +1212,7 @@ instrument_bool_enum_load (gimple_stmt_iterator *gsi)
if (!can_throw)
{
- gimple_assign_set_rhs_with_ops (&gsi2, NOP_EXPR, urhs, NULL_TREE);
+ gimple_assign_set_rhs_with_ops (&gsi2, NOP_EXPR, urhs);
update_stmt (stmt);
}