dwarf2out.c (dwarf2out_line): Constify `lastfile'.
authorRichard Henderson <rth@gcc.gnu.org>
Thu, 2 Sep 1999 17:29:25 +0000 (10:29 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 2 Sep 1999 17:29:25 +0000 (10:29 -0700)
        * dwarf2out.c (dwarf2out_line): Constify `lastfile'.
        * except.c (expand_rethrow): Remove unused variable.
        * expr.c (do_jump_by_parts_greater_rtx): Likewise.
        * flow.c (replace_insns): Likewise.
        (create_edge_list, verify_edge_list): Likewise.
        * gcse.c (cprop_cc0_jump): Protect declaration with HAVE_cc0.

        * genemit.c (gen_expand): Only emit `operands[N]' decl if there
        is special code to run.
        (main): Don't define operands to emit_operand.
        * genrecog.c (main): Don't emit an empty peephole2_insn function.

        * rtl.h (NOTE_BASIC_BLOCK): Use X0BBDEF.

        * alpha/alpha.h (normal_memory_operand): Declare.
        (reg_no_subreg_operand): Declare.
        * alpha/elf.h (ASM_DECLARE_OBJECT_NAME): Use HOST_WIDE_INT_PRINT_DEC.

From-SVN: r29061

gcc/config/alpha/alpha.h
gcc/config/alpha/elf.h
gcc/dwarf2out.c
gcc/except.c
gcc/expr.c
gcc/flow.c
gcc/gcse.c
gcc/genemit.c
gcc/genrecog.c
gcc/rtl.h

index 5499edb66db9d3492e464d1410eaefb2a18443db..2c0e0a2d2cc762a99d5b95a767b9f38008413b2b 100644 (file)
@@ -2549,6 +2549,8 @@ extern int call_operand ();
 extern int reg_or_cint_operand ();
 extern int hard_fp_register_operand ();
 extern int reg_not_elim_operand ();
+extern int normal_memory_operand ();
+extern int reg_no_subreg_operand ();
 extern void alpha_set_memflags ();
 extern int aligned_memory_operand ();
 extern void get_aligned_mem ();
index 6cea3da5d5b45d8d32d2f716dfb2a2320f62c7fe..0765c8754b6787a4fedab15f1854322ca2cea64f 100644 (file)
@@ -415,22 +415,27 @@ void FN ()                                                                \
 
 /* Write the extra assembler code needed to declare an object properly.  */
 
-#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL)                      \
-  do {                                                                 \
-    fprintf (FILE, "\t%s\t ", TYPE_ASM_OP);                            \
-    assemble_name (FILE, NAME);                                                \
-    putc (',', FILE);                                                  \
-    fprintf (FILE, TYPE_OPERAND_FMT, "object");                                \
-    putc ('\n', FILE);                                                 \
-    size_directive_output = 0;                                         \
-    if (!flag_inhibit_size_directive && DECL_SIZE (DECL))              \
-      {                                                                        \
-       size_directive_output = 1;                                      \
-       fprintf (FILE, "\t%s\t ", SIZE_ASM_OP);                         \
-       assemble_name (FILE, NAME);                                     \
-       fprintf (FILE, ",%d\n",  int_size_in_bytes (TREE_TYPE (DECL))); \
-      }                                                                        \
-    ASM_OUTPUT_LABEL(FILE, NAME);                                      \
+#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL)              \
+  do {                                                         \
+    HOST_WIDE_INT size;                                                \
+    fprintf (FILE, "\t%s\t ", TYPE_ASM_OP);                    \
+    assemble_name (FILE, NAME);                                        \
+    putc (',', FILE);                                          \
+    fprintf (FILE, TYPE_OPERAND_FMT, "object");                        \
+    putc ('\n', FILE);                                         \
+    size_directive_output = 0;                                 \
+    if (!flag_inhibit_size_directive                           \
+       && DECL_SIZE (DECL)                                     \
+       && (size = int_size_in_bytes (TREE_TYPE (DECL))) > 0)   \
+      {                                                                \
+       size_directive_output = 1;                              \
+       fprintf (FILE, "\t%s\t ", SIZE_ASM_OP);                 \
+       assemble_name (FILE, NAME);                             \
+       fputc (',', FILE);                                      \
+       fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, size);          \
+       fputc ('\n', FILE);                                     \
+      }                                                                \
+    ASM_OUTPUT_LABEL(FILE, NAME);                              \
   } while (0)
 
 /* Output the size directive for a decl in rest_of_decl_compilation
@@ -440,22 +445,24 @@ void FN ()                                                                \
    by ASM_DECLARE_OBJECT_NAME when it was run for the same decl.  */
 
 #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END)       \
-do {                                                                   \
-  char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0);                    \
-  if (!flag_inhibit_size_directive && DECL_SIZE (DECL)                 \
-      && ! AT_END && TOP_LEVEL                                         \
-      && DECL_INITIAL (DECL) == error_mark_node                                \
-      && !size_directive_output)                                       \
-    {                                                                  \
-      size_directive_output = 1;                                       \
-      fprintf (FILE, "\t%s\t ", SIZE_ASM_OP);                          \
-      assemble_name (FILE, name);                                      \
-      putc (',', FILE);                                                        \
-      fprintf (FILE, HOST_WIDE_INT_PRINT_DEC,                          \
-              int_size_in_bytes (TREE_TYPE (DECL)));                   \
-      putc ('\n', FILE);                                               \
-    }                                                                  \
-} while (0)
+  do {                                                                 \
+    char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0);                  \
+    HOST_WIDE_INT size;                                                        \
+    if (!flag_inhibit_size_directive                                   \
+       && DECL_SIZE (DECL)                                             \
+       && ! AT_END && TOP_LEVEL                                        \
+       && DECL_INITIAL (DECL) == error_mark_node                       \
+       && !size_directive_output                                       \
+       && (size = int_size_in_bytes (TREE_TYPE (DECL))) > 0)           \
+      {                                                                        \
+       size_directive_output = 1;                                      \
+       fprintf (FILE, "\t%s\t ", SIZE_ASM_OP);                         \
+       assemble_name (FILE, name);                                     \
+       fputc (',', FILE);                                              \
+       fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, size);                  \
+       fputc ('\n', FILE);                                             \
+      }                                                                        \
+  } while (0)
 
 /* A table of bytes codes used by the ASM_OUTPUT_ASCII and
    ASM_OUTPUT_LIMITED_STRING macros.  Each byte in the table
index 9fb2d8829415d19adc090fafbef5a31a0f9482f4..09168d6d97f0c5e80131bfa16ffc501100a6f88e 100644 (file)
@@ -9885,7 +9885,7 @@ dwarf2out_line (filename, line)
 
       if (DWARF2_ASM_LINE_DEBUG_INFO)
        {
-         static char *lastfile;
+         static const char *lastfile;
 
          /* Emit the .file and .loc directives understood by GNU as.  */
          if (lastfile == 0 || strcmp (filename, lastfile))
index cc6a8d1b766facb4e34add36f4c95b091822e99b..6cc8465903220d270f9c9825cd0243b64ef0e2b2 100644 (file)
@@ -1907,7 +1907,7 @@ expand_rethrow (label)
   else
     if (flag_new_exceptions)
       {
-       rtx insn, val;
+       rtx insn;
        int region;
        if (label == NULL_RTX)
          label = last_rethrow_symbol;
index 97bf5a9fa00b9f94e7d5411593c43bbc9569358a..967c3e7441d676824d44d973312f0bc518fbb868 100644 (file)
@@ -9012,7 +9012,6 @@ do_jump_by_parts_greater_rtx (mode, unsignedp, op0, op1, if_false_label, if_true
   /* Compare a word at a time, high order first.  */
   for (i = 0; i < nwords; i++)
     {
-      rtx comp;
       rtx op0_word, op1_word;
 
       if (WORDS_BIG_ENDIAN)
index a813d943e690f4c14bb3d71b26350752ce20028d..f917904d14fc788c58212d2ee4f2321b214dd33d 100644 (file)
@@ -6080,9 +6080,8 @@ replace_insns (first, last, first_new, notes)
      rtx first, last, first_new, notes;
 {
   rtx stop = NEXT_INSN (last);
-  rtx last_new;
-  rtx curr, next;
   rtx prev = PREV_INSN (first);
+  rtx last_new, curr;
   int i;
 
   if (notes == NULL_RTX)
@@ -6356,8 +6355,7 @@ create_edge_list ()
   struct edge_list *elist;
   edge e;
   int num_edges;
-  int x,y;
-  int_list_ptr ptr;
+  int x;
   int block_count;
 
   block_count = n_basic_blocks + 2;   /* Include the entry and exit blocks.  */
@@ -6451,8 +6449,6 @@ verify_edge_list (f, elist)
      struct edge_list *elist;
 {
   int x, pred, succ, index;
-  int_list_ptr ptr;
-  int flawed = 0;
   edge e;
 
   for (x = 0; x < n_basic_blocks; x++)
index 3fa620a9c293acb00d09a3fee3720b10f58642a6..2c299a2188f4bd351d1a82f27b3fafdb41bd3e70 100644 (file)
@@ -577,7 +577,9 @@ static void find_used_regs      PROTO ((rtx));
 static int try_replace_reg         PROTO ((rtx, rtx, rtx));
 static struct expr *find_avail_set    PROTO ((int, rtx));
 static int cprop_jump                  PROTO((rtx, rtx, struct reg_use *, rtx));
+#ifdef HAVE_cc0
 static int cprop_cc0_jump              PROTO((rtx, struct reg_use *, rtx));
+#endif
 static int cprop_insn           PROTO ((rtx, int));
 static int cprop                     PROTO ((int));
 static int one_cprop_pass           PROTO ((int, int));
index 68188e6c2ea96b94701043de8a64a9520e61ed4a..f9d917e3245b27be97a454caa503559c1043e540 100644 (file)
@@ -459,9 +459,6 @@ gen_expand (expand)
     printf ("  rtx operand%d;\n", i);
   for (; i <= max_scratch_opno; i++)
     printf ("  rtx operand%d;\n", i);
-  if (operands > 0 || max_dup_opno >= 0 || max_scratch_opno >= 0)
-    printf ("  rtx operands[%d];\n",
-           MAX (operands, MAX (max_scratch_opno, max_dup_opno) + 1));
   printf ("  rtx _val = 0;\n");
   printf ("  start_sequence ();\n");
 
@@ -473,9 +470,13 @@ gen_expand (expand)
      So copy the operand values there before executing it.  */
   if (XSTR (expand, 3) && *XSTR (expand, 3))
     {
+      printf ("  {\n");
+      if (operands > 0 || max_dup_opno >= 0 || max_scratch_opno >= 0)
+       printf ("    rtx operands[%d];\n",
+           MAX (operands, MAX (max_scratch_opno, max_dup_opno) + 1));
       /* Output code to copy the arguments into `operands'.  */
       for (i = 0; i < operands; i++)
-       printf ("  operands[%d] = operand%d;\n", i, i);
+       printf ("    operands[%d] = operand%d;\n", i, i);
 
       /* Output the special code to be executed before the sequence
         is generated.  */
@@ -486,12 +487,13 @@ gen_expand (expand)
       if (XVEC (expand, 1) != 0)
        {
          for (i = 0; i < operands; i++)
-           printf ("  operand%d = operands[%d];\n", i, i);
+           printf ("    operand%d = operands[%d];\n", i, i);
          for (; i <= max_dup_opno; i++)
-           printf ("  operand%d = operands[%d];\n", i, i);
+           printf ("    operand%d = operands[%d];\n", i, i);
          for (; i <= max_scratch_opno; i++)
-           printf ("  operand%d = operands[%d];\n", i, i);
+           printf ("    operand%d = operands[%d];\n", i, i);
        }
+      printf ("  }\n");
     }
 
   /* Output code to construct the rtl for the instruction bodies.
@@ -815,7 +817,6 @@ from the machine description file `md'.  */\n\n");
   printf ("#include \"resource.h\"\n");
   printf ("#include \"reload.h\"\n\n");
   printf ("extern rtx recog_operand[];\n");
-  printf ("#define operands emit_operand\n\n");
   printf ("#define FAIL return (end_sequence (), _val)\n");
   printf ("#define DONE return (_val = gen_sequence (), end_sequence (), _val)\n");
 
index a2eef4617d81b88951a296f2167686c70a9dc6af..804cffcd34bcbc7a5055886a93d05d9414c34c67 100644 (file)
@@ -1979,9 +1979,12 @@ from the machine description file `md'.  */\n\n");
   break_out_subroutines (split_tree, SPLIT, 1);
   write_subroutine (split_tree.first, SPLIT);
 
-  next_subroutine_number = 0;
-  break_out_subroutines (peephole2_tree, PEEPHOLE2, 1);
-  write_subroutine (peephole2_tree.first, PEEPHOLE2);
+  if (peephole2_tree.first)
+    {
+      next_subroutine_number = 0;
+      break_out_subroutines (peephole2_tree, PEEPHOLE2, 1);
+      write_subroutine (peephole2_tree.first, PEEPHOLE2);
+    }
 
   fflush (stdout);
   exit (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
index 59b27069466284c26a9e22267e26634b5c234784..0bb488ddf6685f580db6aeea5df4b70050c9174f 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -476,7 +476,7 @@ extern const char * const reg_note_name[];
 #define NOTE_EH_HANDLER(INSN)  X0INT(INSN, 3)
 #define NOTE_RANGE_INFO(INSN)          X0EXP(INSN, 3)
 #define NOTE_LIVE_INFO(INSN)           X0EXP(INSN, 3)
-#define NOTE_BASIC_BLOCK(INSN) X0EXP(INSN, 3)
+#define NOTE_BASIC_BLOCK(INSN) X0BBDEF(INSN, 3)
 
 /* If the NOTE_BLOCK_NUMBER field gets a -1, it means create a new
    block node for a live range block.  */