Commit 545cd7ec by Richard Biener Committed by Richard Biener

gimple-match.h (maybe_build_generic_op): Adjust prototype.

2016-04-20  Richard Biener  <rguenther@suse.de>

	* gimple-match.h (maybe_build_generic_op): Adjust prototype.
	* gimple-match-head.c (maybe_build_generic_op): Pass all ops
	by reference, clear op1 and op2 when GENERICizing BIT_FIELD_REF.
	(maybe_push_res_to_seq): Adjust.
	* gimple-fold.c (maybe_build_generic_op): Likewise.

From-SVN: r235274
parent dd39022b
2016-04-20 Richard Biener <rguenther@suse.de>
* gimple-match.h (maybe_build_generic_op): Adjust prototype.
* gimple-match-head.c (maybe_build_generic_op): Pass all ops
by reference, clear op1 and op2 when GENERICizing BIT_FIELD_REF.
(maybe_push_res_to_seq): Adjust.
* gimple-fold.c (maybe_build_generic_op): Likewise.
2016-04-20 Marek Polacek <polacek@redhat.com> 2016-04-20 Marek Polacek <polacek@redhat.com>
* tree-if-conv.c (is_false_predicate): For NULL_TREE return false * tree-if-conv.c (is_false_predicate): For NULL_TREE return false
......
...@@ -3376,8 +3376,7 @@ replace_stmt_with_simplification (gimple_stmt_iterator *gsi, ...@@ -3376,8 +3376,7 @@ replace_stmt_with_simplification (gimple_stmt_iterator *gsi,
|| gimple_num_ops (stmt) > get_gimple_rhs_num_ops (rcode)) || gimple_num_ops (stmt) > get_gimple_rhs_num_ops (rcode))
{ {
maybe_build_generic_op (rcode, maybe_build_generic_op (rcode,
TREE_TYPE (gimple_assign_lhs (stmt)), TREE_TYPE (gimple_assign_lhs (stmt)), ops);
&ops[0], ops[1], ops[2]);
gimple_assign_set_rhs_with_ops (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)) if (dump_file && (dump_flags & TDF_DETAILS))
{ {
......
...@@ -233,18 +233,18 @@ gimple_resimplify3 (gimple_seq *seq, ...@@ -233,18 +233,18 @@ gimple_resimplify3 (gimple_seq *seq,
a GENERIC tree for that expression into *OP0. */ a GENERIC tree for that expression into *OP0. */
void void
maybe_build_generic_op (enum tree_code code, tree type, maybe_build_generic_op (enum tree_code code, tree type, tree *ops)
tree *op0, tree op1, tree op2)
{ {
switch (code) switch (code)
{ {
case REALPART_EXPR: case REALPART_EXPR:
case IMAGPART_EXPR: case IMAGPART_EXPR:
case VIEW_CONVERT_EXPR: case VIEW_CONVERT_EXPR:
*op0 = build1 (code, type, *op0); ops[0] = build1 (code, type, ops[0]);
break; break;
case BIT_FIELD_REF: case BIT_FIELD_REF:
*op0 = build3 (code, type, *op0, op1, op2); ops[0] = build3 (code, type, ops[0], ops[1], ops[2]);
ops[1] = ops[2] = NULL_TREE;
break; break;
default:; default:;
} }
...@@ -316,7 +316,7 @@ maybe_push_res_to_seq (code_helper rcode, tree type, tree *ops, ...@@ -316,7 +316,7 @@ maybe_push_res_to_seq (code_helper rcode, tree type, tree *ops,
else else
res = create_tmp_reg (type); res = create_tmp_reg (type);
} }
maybe_build_generic_op (rcode, type, &ops[0], ops[1], ops[2]); maybe_build_generic_op (rcode, type, ops);
gimple *new_stmt = gimple_build_assign (res, rcode, gimple *new_stmt = gimple_build_assign (res, rcode,
ops[0], ops[1], ops[2]); ops[0], ops[1], ops[2]);
gimple_seq_add_stmt_without_update (seq, new_stmt); gimple_seq_add_stmt_without_update (seq, new_stmt);
......
...@@ -64,7 +64,7 @@ bool gimple_resimplify3 (gimple_seq *, code_helper *, tree, tree *, ...@@ -64,7 +64,7 @@ bool gimple_resimplify3 (gimple_seq *, code_helper *, tree, tree *,
tree (*)(tree)); tree (*)(tree));
tree maybe_push_res_to_seq (code_helper, tree, tree *, tree maybe_push_res_to_seq (code_helper, tree, tree *,
gimple_seq *, tree res = NULL_TREE); gimple_seq *, tree res = NULL_TREE);
void maybe_build_generic_op (enum tree_code, tree, tree *, tree, tree); void maybe_build_generic_op (enum tree_code, tree, tree *);
#endif /* GCC_GIMPLE_MATCH_H */ #endif /* GCC_GIMPLE_MATCH_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment