Commit 57d4f65c by Zack Weinberg

dwarf2out.c (loclabel_num): Move outside #ifdef DWARF2_DEBUGGING_INFO and mark with GTY(()).

	* 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
parent 3fec9fa9
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
......
......@@ -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)
const char *name = XSTR (XEXP (DECL_RTL (decl), 0), 0);
TREE_ASM_WRITTEN (decl) = 1;
(*targetm.asm_out.globalize_label) (asm_out_file,
extern_func_head->name);
(*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. */
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment