]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
dwarf2out.c (loclabel_num): Move outside #ifdef DWARF2_DEBUGGING_INFO and mark with...
authorZack Weinberg <zack@gcc.gnu.org>
Wed, 18 Feb 2004 23:58:00 +0000 (23:58 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Wed, 18 Feb 2004 23:58:00 +0000 (23:58 +0000)
* dwarf2out.c (loclabel_num): Move outside #ifdef
DWARF2_DEBUGGING_INFO and mark with GTY(()).
* config/ia64/ia64.c (struct extern_func_list,extern_func_head):
Mark with GTY(()).
(ia64_hpux_add_extern_decl): Save the decl, not the name string.
Allocate memory with ggc_alloc.  No need to copy anything.
(ia64_hpux_file_end): Update to match.

From-SVN: r78061

gcc/ChangeLog
gcc/config/ia64/ia64.c
gcc/dwarf2out.c

index e7ed408448a6c2b6c98dafeafb211dfba56854c4..a32d3f8aac3a92e40845a93ead22c2d579ded60d 100644 (file)
@@ -1,3 +1,13 @@
+2004-02-18  Zack Weinberg  <zack@codesourcery.com>
+
+       * dwarf2out.c (loclabel_num): Move outside #ifdef
+       DWARF2_DEBUGGING_INFO and mark with GTY(()).
+       * config/ia64/ia64.c (struct extern_func_list,extern_func_head):
+       Mark with GTY(()).
+       (ia64_hpux_add_extern_decl): Save the decl, not the name string.
+       Allocate memory with ggc_alloc.  No need to copy anything.
+       (ia64_hpux_file_end): Update to match.
+
 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
 
        * config/i386/i386.c (override_options): Don't imply 3DNow! for -m64
 
 2004-02-17  Ulrich Weigand  <uweigand@de.ibm.com>
 
-       * combine.c (simplify_if_then_else): Do not replace 
+       * combine.c (simplify_if_then_else): Do not replace
        (if_then_else (ne reg 0) (0) (const_int)) by (reg) if the
        modes differ.
 
        * config/mips/t-irix-gld: ... this.
        * config.gcc (mips-sgi-irix6*): Reflect this
        (mips-sgi-irix5*): Use it with GNU ld.
-       
+
        * config/mips/irix6-crti.asm, config/mips/irix6-crtn.asm: Renamed
        to ...
        * config/mips/irix-crti.asm, config/mips/irix-crtn.asm: ... this.
        * config/mips/t-irix-gld: Reflect this.
        * config/mips/iris6gld.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
-       
+
        * config/mips/iris5gld.h: New file.
        * config.gcc (mips-sgi-irix5*): Use it with GNU ld.
        Only use collect2 without gas.
-       
+
        * config/mips/iris6.h (IRIX6_STARTFILE_SPEC, IRIX6_ENDFILE_SPEC):
        Renamed to IRIX_STARTFILE_SPEC, IRIX_ENDFILE_SPEC.
        (STARTFILE_SPEC, ENDFILE_SPEC, SUBTARGET_EXTRA_SPECS): Reflect this.
        * config/mips/iris6gld.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
-       
+
        * config/mips/iris6.h (SUBTARGET_EXTRA_SPECS): Moved ...
        * config/mips/iris5.h: ... here.
 
        * config/mips/iris5.h (STARTFILE_SPEC, ENDFILE_SPEC): Renamed to
-       IRIX_STARTFILE_SPEC, IRIX_ENDFILE_SPEC. 
+       IRIX_STARTFILE_SPEC, IRIX_ENDFILE_SPEC.
        (STARTFILE_SPEC, ENDFILE_SPEC): Define.
-       
+
        * config/mips/iris5gas.h (STARTFILE_SPEC, ENDFILE_SPEC): Simplify
        using irix_startfile_spec, irix_endfile_spec.
 
        New function.
        (ia64_output_mi_thunk): Use it.
        (ia64_struct_value_rtx): Likewise.
-       
+
 2004-02-17  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/h8300/h8300.c (h8300_emit_stack_adjustment):
 
 2004-02-16  Matthias Klose  <doko@debian.org>
 
-        * config/t-slibgcc-elf-ver: Define SHLIB_NAME and SHLIB_SONAME
-        in terms of SHLIB_SOVERSION.
-        * config/m68k/t-slibgcc-elf-ver: New file.
-        * config/pa/t-slibgcc-elf-ver: New file.
-        * config.gcc (m68k-linux, parisc-linux): Use them when not 
+       * config/t-slibgcc-elf-ver: Define SHLIB_NAME and SHLIB_SONAME
+       in terms of SHLIB_SOVERSION.
+       * config/m68k/t-slibgcc-elf-ver: New file.
+       * config/pa/t-slibgcc-elf-ver: New file.
+       * config.gcc (m68k-linux, parisc-linux): Use them when not
        sjlj exceptions are not configured.
 
 2004-02-16  Eric Botcazou  <ebotcazou@libertysurf.fr>
index 5e39e6e805b8d124956c2b0fa390664e1188bfea..f7e5cc341c73df2e5f3ee67185b9d858bc5a520f 100644 (file)
@@ -257,7 +257,7 @@ static void ia64_rwreloc_select_rtx_section (enum machine_mode, rtx,
 static unsigned int ia64_rwreloc_section_type_flags (tree, const char *, int)
      ATTRIBUTE_UNUSED;
 
-static void ia64_hpux_add_extern_decl (const char *name)
+static void ia64_hpux_add_extern_decl (tree decl)
      ATTRIBUTE_UNUSED;
 static void ia64_hpux_file_end (void)
      ATTRIBUTE_UNUSED;
@@ -4627,7 +4627,7 @@ ia64_asm_output_external (FILE *file, tree decl, const char *name)
     return;
 
   if (TARGET_HPUX_LD)
-    ia64_hpux_add_extern_decl (name);
+    ia64_hpux_add_extern_decl (decl);
   else
     {
       /* assemble_name will set TREE_SYMBOL_REFERENCED, so we must save and
@@ -8653,20 +8653,20 @@ ia64_hpux_function_arg_padding (enum machine_mode mode, tree type)
    We output the name if and only if TREE_SYMBOL_REFERENCED is set in
    order to avoid putting out names that are never really used.  */
 
-struct extern_func_list
+struct extern_func_list GTY(())
 {
-  struct extern_func_list *next; /* next external */
-  char *name;                    /* name of the external */
-} *extern_func_head = 0;
+  struct extern_func_list *next;
+  tree decl;
+};
+
+static GTY(()) struct extern_func_list *extern_func_head;
 
 static void
-ia64_hpux_add_extern_decl (const char *name)
+ia64_hpux_add_extern_decl (tree decl)
 {
-  struct extern_func_list *p;
+  struct extern_func_list *p = ggc_alloc (sizeof (struct extern_func_list));
 
-  p = (struct extern_func_list *) xmalloc (sizeof (struct extern_func_list));
-  p->name = xmalloc (strlen (name) + 1);
-  strcpy(p->name, name);
+  p->decl = decl;
   p->next = extern_func_head;
   extern_func_head = p;
 }
@@ -8676,29 +8676,29 @@ ia64_hpux_add_extern_decl (const char *name)
 static void
 ia64_hpux_file_end (void)
 {
-  while (extern_func_head)
+  struct extern_func_list *p;
+
+  for (p = extern_func_head; p; p = p->next)
     {
-      const char *real_name;
-      tree decl;
+      tree decl = p->decl;
+      tree id = DECL_NAME (decl);
 
-      real_name = (* targetm.strip_name_encoding) (extern_func_head->name);
-      decl = maybe_get_identifier (real_name);
+      if (!id)
+       abort ();
 
-      if (!decl
-         || (! TREE_ASM_WRITTEN (decl) && TREE_SYMBOL_REFERENCED (decl)))
+      if (!TREE_ASM_WRITTEN (decl) && TREE_SYMBOL_REFERENCED (id))
         {
-         if (decl)
-           TREE_ASM_WRITTEN (decl) = 1;
-         (*targetm.asm_out.globalize_label) (asm_out_file,
-                                             extern_func_head->name);
+         const char *name = XSTR (XEXP (DECL_RTL (decl), 0), 0);
+
+         TREE_ASM_WRITTEN (decl) = 1;
+         (*targetm.asm_out.globalize_label) (asm_out_file, name);
          fputs (TYPE_ASM_OP, asm_out_file);
-         assemble_name (asm_out_file, extern_func_head->name);
-         putc (',', asm_out_file);
-         fprintf (asm_out_file, TYPE_OPERAND_FMT, "function");
-         putc ('\n', asm_out_file);
+         assemble_name (asm_out_file, name);
+         fprintf (asm_out_file, "," TYPE_OPERAND_FMT "\n", "function");
         }
-      extern_func_head = extern_func_head->next;
     }
+
+  extern_func_head = 0;
 }
 
 /* Rename all the TFmode libfuncs using the HPUX conventions.  */
index 87f1be715b391f8b9b84499482a002386b7887e0..0bfe62c4efc5a3c49326ca52116b0740fb3a4757 100644 (file)
@@ -3592,12 +3592,12 @@ static GTY(()) unsigned ranges_table_in_use;
 /* Whether we have location lists that need outputting */
 static GTY(()) unsigned have_location_lists;
 
+/* Unique label counter.  */
+static GTY(()) unsigned int loclabel_num;
+
 #ifdef DWARF2_DEBUGGING_INFO
 /* Record whether the function being analyzed contains inlined functions.  */
 static int current_function_has_inlines;
-
-/* Unique label counter.  */
-static unsigned int loclabel_num = 0;
 #endif
 #if 0 && defined (MIPS_DEBUGGING_INFO)
 static int comp_unit_has_inlines;