[PATCH] More PCH fixes
Ulrich Weigand
weigand@immd1.informatik.uni-erlangen.de
Sat Jan 18 02:07:00 GMT 2003
Geoff Keating wrote:
> The idea seems good, but you can't have GTY-marked objects inside #if,
> you have to move them outside.
Sorry, I wasn't aware of that. Unfortunately, the easy way to do that
will cause (yet more) warnings on platforms that disable (parts of)
DWARF2 support, but I don't see a way to avoid this without using
#if ...
Bootstrapped/regtested on s390-ibm-linux and s390x-ibm-linux.
OK?
ChangeLog:
* dwarf2out.c (fde_table_in_use): Mark GTY.
(dwarf2out_cfi_label_num): New variable, marked GTY.
(dwarf2out_cfi_label): Use it instead of static label_num.
* varasm.c (label_num): Mark GTY.
Index: gcc/dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.394
diff -c -p -r1.394 dwarf2out.c
*** gcc/dwarf2out.c 17 Jan 2003 02:34:04 -0000 1.394
--- gcc/dwarf2out.c 18 Jan 2003 00:08:39 -0000
*************** static GTY((length ("fde_table_allocated
*** 279,288 ****
/* Number of elements currently allocated for fde_table. */
static unsigned fde_table_allocated;
- #if defined (DWARF2_DEBUGGING_INFO) || defined (DWARF2_UNWIND_INFO)
/* Number of elements in fde_table currently in use. */
! static unsigned fde_table_in_use;
! #endif
/* Size (in elements) of increments by which we may expand the
fde_table. */
--- 279,286 ----
/* Number of elements currently allocated for fde_table. */
static unsigned fde_table_allocated;
/* Number of elements in fde_table currently in use. */
! static GTY(()) unsigned fde_table_in_use;
/* Size (in elements) of increments by which we may expand the
fde_table. */
*************** struct indirect_string_node GTY(())
*** 310,315 ****
--- 308,314 ----
static GTY ((param_is (struct indirect_string_node))) htab_t debug_str_hash;
static GTY(()) int dw2_string_counter;
+ static GTY(()) unsigned long dwarf2out_cfi_label_num;
#if defined (DWARF2_DEBUGGING_INFO) || defined (DWARF2_UNWIND_INFO)
*************** char *
*** 561,569 ****
dwarf2out_cfi_label ()
{
static char label[20];
- static unsigned long label_num = 0;
! ASM_GENERATE_INTERNAL_LABEL (label, "LCFI", label_num++);
ASM_OUTPUT_LABEL (asm_out_file, label);
return label;
}
--- 560,567 ----
dwarf2out_cfi_label ()
{
static char label[20];
! ASM_GENERATE_INTERNAL_LABEL (label, "LCFI", dwarf2out_cfi_label_num++);
ASM_OUTPUT_LABEL (asm_out_file, label);
return label;
}
Index: gcc/emit-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
retrieving revision 1.306
diff -c -p -r1.306 emit-rtl.c
*** gcc/emit-rtl.c 16 Jan 2003 15:12:52 -0000 1.306
--- gcc/emit-rtl.c 18 Jan 2003 00:08:45 -0000
*************** enum machine_mode ptr_mode; /* Mode whos
*** 69,75 ****
/* This is *not* reset after each function. It gives each CODE_LABEL
in the entire compilation a unique label number. */
! static int label_num = 1;
/* Highest label number in current function.
Zero means use the value of label_num instead.
--- 69,75 ----
/* This is *not* reset after each function. It gives each CODE_LABEL
in the entire compilation a unique label number. */
! static GTY(()) int label_num = 1;
/* Highest label number in current function.
Zero means use the value of label_num instead.
--
Dr. Ulrich Weigand
weigand@informatik.uni-erlangen.de
More information about the Gcc-patches
mailing list