* 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.
From-SVN: r217781
+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
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);
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);
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);
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);
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);
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);
{
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
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 ");
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;
|| 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);
}
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);
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);
{
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;
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.
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);
}
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);
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);
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);
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. */
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;
}
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])
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);
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)
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)
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)
{
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
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;
}
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);
{
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);
}
{
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;
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;
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
{
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;
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);
{
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);
}
{
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);
}
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;
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++;
}
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;
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);
/* 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);
}
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);
}
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);
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);
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);
}
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. */
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));
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),
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));
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);
/* 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;
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;
}
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 ())
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;
/* 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;
}
/* 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);
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
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
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);
}
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
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,
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);
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);
}
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:
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);
{
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);
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;
}
{
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;
}
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;
}
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;
}
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
{
{
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);
}
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);
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);
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;
}
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
{
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
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;
}
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);
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);
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);
{
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);
}
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;
}
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,
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);
}
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);
}
? 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);
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);
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);
}