genmatch.c (dt_node::gen_kids_1): If generic_exprs include SSA_NAME and exprs_len || fns_len...

* genmatch.c (dt_node::gen_kids_1): If generic_exprs include SSA_NAME
	and exprs_len || fns_len, emit the code for SSA_NAME next to the exprs
	and fns handling, rather than in a separate case SSA_NAME.

From-SVN: r244012
This commit is contained in:
Jakub Jelinek 2017-01-03 08:17:38 +01:00 committed by Jakub Jelinek
parent 994e4aca2c
commit d003cf5ef6
2 changed files with 23 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2017-01-03 Jakub Jelinek <jakub@redhat.com>
* genmatch.c (dt_node::gen_kids_1): If generic_exprs include SSA_NAME
and exprs_len || fns_len, emit the code for SSA_NAME next to the exprs
and fns handling, rather than in a separate case SSA_NAME.
2017-01-02 Jeff Law <law@redhat.com>
* config/darwin-driver.c (darwin_driver_init): Const-correctness

View File

@ -2913,6 +2913,20 @@ dt_node::gen_kids_1 (FILE *f, int indent, bool gimple,
indent -= 6;
fprintf_indent (f, indent, " }\n");
/* See if there is SSA_NAME among generic_exprs and if yes, emit it
here rather than in the next loop. */
for (unsigned i = 0; i < generic_exprs.length (); ++i)
{
expr *e = as_a <expr *>(generic_exprs[i]->op);
id_base *op = e->operation;
if (*op == SSA_NAME && (exprs_len || fns_len))
{
fprintf_indent (f, indent + 4, "{\n");
generic_exprs[i]->gen (f, indent + 6, gimple);
fprintf_indent (f, indent + 4, "}\n");
}
}
fprintf_indent (f, indent, " break;\n");
}
@ -2922,6 +2936,9 @@ dt_node::gen_kids_1 (FILE *f, int indent, bool gimple,
id_base *op = e->operation;
if (*op == CONVERT_EXPR || *op == NOP_EXPR)
fprintf_indent (f, indent, "CASE_CONVERT:\n");
else if (*op == SSA_NAME && (exprs_len || fns_len))
/* Already handled above. */
continue;
else
fprintf_indent (f, indent, "case %s:\n", op->id);
fprintf_indent (f, indent, " {\n");