diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-07-10 11:59:00 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-07-10 11:59:00 +0000 |
commit | 011009fb477d5d0d96b91db012c96185e5bc1441 (patch) | |
tree | d9a3d28e64ebd8cf8931ef76b3bf00e647fcd12b | |
parent | ce85984c5002a164636515f712e762ce45ee63db (diff) | |
download | gcc-011009fb477d5d0d96b91db012c96185e5bc1441.tar.gz |
2015-07-10 Richard Biener <rguenther@suse.de>
* genmatch.c (dt_node::gen_kids_1): Fix indenting of
case labels.
(decision_tree::gen_gimple): Likewise.
(decision_tree::gen_generic): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225663 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/genmatch.c | 50 |
2 files changed, 32 insertions, 25 deletions
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 <rguenther@suse.de> + + * 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 <ubizjak@gmail.com> 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 <expr *> (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 <fn_id *> (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 <operator_id *> (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"); |