aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2001-12-22 14:31:27 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2001-12-22 09:31:27 -0500
commitc470afad3c835b020cdd9c500f38f9d12713866a (patch)
treeb796073bdba01040f52390a2e8762505de8e6e7c /gcc
parent7a73ad55d8dbf2a2cf99268013d41a0af0d95b02 (diff)
downloadgcc-c470afad3c835b020cdd9c500f38f9d12713866a.zip
gcc-c470afad3c835b020cdd9c500f38f9d12713866a.tar.gz
gcc-c470afad3c835b020cdd9c500f38f9d12713866a.tar.bz2
dwarf2out.c (save_rtx): Deleted.
* dwarf2out.c (save_rtx): Deleted. (mem_loc_descriptor): Do equivalent operation. (add_const_value_attribute, case CONST): Likewise. (add_name_and_src_coords_attributes): Likewise. From-SVN: r48266
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/dwarf2out.c31
2 files changed, 17 insertions, 21 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 30c0240..69e5c51 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+Sat Dec 22 08:59:50 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * dwarf2out.c (save_rtx): Deleted.
+ (mem_loc_descriptor): Do equivalent operation.
+ (add_const_value_attribute, case CONST): Likewise.
+ (add_name_and_src_coords_attributes): Likewise.
+
2001-12-21 Kazu Hirata <kazu@hxi.com>
* config/h8300/h8300.h: Fix comment formatting.
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 2cbe716..8c28bf4 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -3386,9 +3386,7 @@ static int comp_unit_has_inlines;
#endif
/* Array of RTXes referenced by the debugging information, which therefore
- must be kept around forever. We do this rather than perform GC on
- the dwarf info because almost all of the dwarf info lives forever, and
- it's easier to support non-GC frontends this way. */
+ must be kept around forever. This is a GC root. */
static varray_type used_rtx_varray;
/* Forward declarations for functions defined in this file. */
@@ -3604,7 +3602,6 @@ static void init_file_table PARAMS ((void));
static void add_incomplete_type PARAMS ((tree));
static void retry_incomplete_types PARAMS ((void));
static void gen_type_die_for_member PARAMS ((tree, tree, dw_die_ref));
-static rtx save_rtx PARAMS ((rtx));
static void splice_child_die PARAMS ((dw_die_ref, dw_die_ref));
static int file_info_cmp PARAMS ((const void *, const void *));
static dw_loc_list_ref new_loc_list PARAMS ((dw_loc_descr_ref,
@@ -3736,19 +3733,6 @@ dwarf2out_set_demangle_name_func (func)
{
demangle_name_func = func;
}
-
-/* Return an rtx like ORIG which lives forever. If we're doing GC,
- that means adding it to used_rtx_varray. If not, that means making
- a copy on the permanent_obstack. */
-
-static rtx
-save_rtx (orig)
- rtx orig;
-{
- VARRAY_PUSH_RTX (used_rtx_varray, orig);
-
- return orig;
-}
/* Test if rtl node points to a pseudo register. */
@@ -7770,7 +7754,8 @@ mem_loc_descriptor (rtl, mode)
mem_loc_result = new_loc_descr (DW_OP_addr, 0, 0);
mem_loc_result->dw_loc_oprnd1.val_class = dw_val_class_addr;
- mem_loc_result->dw_loc_oprnd1.v.val_addr = save_rtx (rtl);
+ mem_loc_result->dw_loc_oprnd1.v.val_addr = rtl;
+ VARRAY_PUSH_RTX (used_rtx_varray, rtl);
break;
case PRE_MODIFY:
@@ -8623,7 +8608,8 @@ add_const_value_attribute (die, rtl)
case SYMBOL_REF:
case LABEL_REF:
case CONST:
- add_AT_addr (die, DW_AT_const_value, save_rtx (rtl));
+ add_AT_addr (die, DW_AT_const_value, rtl);
+ VARRAY_PUSH_RTX (used_rtx_varray, rtl);
break;
case PLUS:
@@ -9365,8 +9351,11 @@ add_name_and_src_coords_attributes (die, decl)
/* Get the function's name, as described by its RTL. This may be different
from the DECL_NAME name used in the source file. */
if (TREE_CODE (decl) == FUNCTION_DECL && TREE_ASM_WRITTEN (decl))
- add_AT_addr (die, DW_AT_VMS_rtnbeg_pd_address,
- save_rtx (XEXP (DECL_RTL (decl), 0)));
+ {
+ add_AT_addr (die, DW_AT_VMS_rtnbeg_pd_address,
+ XEXP (DECL_RTL (decl), 0));
+ VARRAY_PUSH_RTX (used_rtx_varray, XEXP (DECL_RTL (decl), 0));
+ }
#endif
}