genmatch.c (dt_node::gen_kids_1): Fix indenting of case labels.
authorRichard Biener <rguenther@suse.de>
Fri, 10 Jul 2015 11:59:00 +0000 (11:59 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 10 Jul 2015 11:59:00 +0000 (11:59 +0000)
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.

From-SVN: r225663

gcc/ChangeLog
gcc/genmatch.c

index f305c72481ab40ca9f0a23e887e579a19312b303..dd9b1b692f2270b51a8b4d2043cc5f623f9b33a6 100644 (file)
@@ -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
index 1a8895f0d1d9c717438a648dcb01a84a67ebfb7d..295925c1061ad51a626bf9034feadf5700218876 100644 (file)
@@ -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");