From: Richard Biener Date: Fri, 10 Jul 2015 11:59:00 +0000 (+0000) Subject: genmatch.c (dt_node::gen_kids_1): Fix indenting of case labels. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1651e9b17c6e41564bb12a073d423961bff33ffe;p=gcc.git genmatch.c (dt_node::gen_kids_1): Fix indenting of case labels. 2015-07-10 Richard Biener * genmatch.c (dt_node::gen_kids_1): Fix indenting of case labels. (decision_tree::gen_gimple): Likewise. (decision_tree::gen_generic): Likewise. From-SVN: r225663 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f305c72481a..dd9b1b692f2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-07-10 Richard Biener + + * genmatch.c (dt_node::gen_kids_1): Fix indenting of + case labels. + (decision_tree::gen_gimple): Likewise. + (decision_tree::gen_generic): Likewise. + 2015-07-10 Uros Bizjak PR target/66813 diff --git a/gcc/genmatch.c b/gcc/genmatch.c index 1a8895f0d1d..295925c1061 100644 --- a/gcc/genmatch.c +++ b/gcc/genmatch.c @@ -2275,7 +2275,7 @@ dt_node::gen_kids_1 (FILE *f, int indent, bool gimple, fprintf_indent (f, indent, "switch (TREE_CODE (%s))\n", kid_opname); fprintf_indent (f, indent, " {\n"); - indent += 4; + indent += 2; } if (exprs_len || fns_len) @@ -2305,15 +2305,15 @@ dt_node::gen_kids_1 (FILE *f, int indent, bool gimple, expr *e = as_a (gimple_exprs[i]->op); id_base *op = e->operation; if (*op == CONVERT_EXPR || *op == NOP_EXPR) - fprintf_indent (f, indent, " CASE_CONVERT:\n"); + fprintf_indent (f, indent, "CASE_CONVERT:\n"); else - fprintf_indent (f, indent, " case %s:\n", op->id); - fprintf_indent (f, indent, " {\n"); - gimple_exprs[i]->gen (f, indent + 6, true); - fprintf_indent (f, indent, " break;\n"); - fprintf_indent (f, indent, " }\n"); + fprintf_indent (f, indent, "case %s:\n", op->id); + fprintf_indent (f, indent, " {\n"); + gimple_exprs[i]->gen (f, indent + 4, true); + fprintf_indent (f, indent, " break;\n"); + fprintf_indent (f, indent, " }\n"); } - fprintf_indent (f, indent, " default:;\n"); + fprintf_indent (f, indent, "default:;\n"); indent -= 4; fprintf_indent (f, indent, "}\n"); } @@ -2386,7 +2386,7 @@ dt_node::gen_kids_1 (FILE *f, int indent, bool gimple, " switch (DECL_FUNCTION_CODE (fndecl))\n"); fprintf_indent (f, indent, " {\n"); - indent += 10; + indent += 8; for (unsigned j = 0; j < generic_fns.length (); ++j) { @@ -2400,7 +2400,7 @@ dt_node::gen_kids_1 (FILE *f, int indent, bool gimple, fprintf_indent (f, indent, " }\n"); } - indent -= 10; + indent -= 8; fprintf_indent (f, indent, " default:;\n"); fprintf_indent (f, indent, " }\n"); fprintf_indent (f, indent, " break;\n"); @@ -2849,18 +2849,18 @@ decision_tree::gen_gimple (FILE *f) if (*e->operation == CONVERT_EXPR || *e->operation == NOP_EXPR) - fprintf (f, " CASE_CONVERT:\n"); + fprintf (f, " CASE_CONVERT:\n"); else - fprintf (f, " case %s%s:\n", + fprintf (f, " case %s%s:\n", is_a (e->operation) ? "-" : "", e->operation->id); - fprintf (f, " {\n"); - dop->gen_kids (f, 10, true); - fprintf (f, " break;\n"); - fprintf (f, " }\n"); + fprintf (f, " {\n"); + dop->gen_kids (f, 8, true); + fprintf (f, " break;\n"); + fprintf (f, " }\n"); } - fprintf (f, " default:;\n" - " }\n"); + fprintf (f, " default:;\n" + " }\n"); fprintf (f, " return false;\n"); fprintf (f, "}\n"); @@ -2899,15 +2899,15 @@ decision_tree::gen_generic (FILE *f) operator_id *op_id = static_cast (e->operation); if (op_id->code == NOP_EXPR || op_id->code == CONVERT_EXPR) - fprintf (f, " CASE_CONVERT:\n"); + fprintf (f, " CASE_CONVERT:\n"); else - fprintf (f, " case %s:\n", e->operation->id); - fprintf (f, " {\n"); - dop->gen_kids (f, 10, false); - fprintf (f, " break;\n" - " }\n"); + fprintf (f, " case %s:\n", e->operation->id); + fprintf (f, " {\n"); + dop->gen_kids (f, 8, false); + fprintf (f, " break;\n" + " }\n"); } - fprintf (f, " default:;\n" + fprintf (f, " default:;\n" " }\n"); fprintf (f, " return NULL_TREE;\n");