This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix documentation issue in dwarf2out.c


The comments for save_rtx were, at best, misleading.  Moreover, that
function serves no useful purpose now, so I eliminated it and moved
the one line it does to the call sites (there used to be three and now
there are two) instead.

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.

*** dwarf2out.c	2001/12/19 11:21:29	1.339
--- dwarf2out.c	2001/12/22 14:02:58
*************** static int comp_unit_has_inlines;
*** 3387,3393 ****
  
  /* 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.  */
  static varray_type used_rtx_varray;
  
--- 3387,3391 ----
  
  /* Array of RTXes referenced by the debugging information, which therefore
!    must be kept around forever.  This is a GC root.  */
  static varray_type used_rtx_varray;
  
*************** static void add_incomplete_type		PARAMS 
*** 3605,3609 ****
  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 *));
--- 3603,3606 ----
*************** dwarf2out_set_demangle_name_func (func)
*** 3737,3754 ****
    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.  */
  
--- 3734,3738 ----
*************** mem_loc_descriptor (rtl, mode)
*** 7771,7775 ****
        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);
        break;
  
--- 7755,7760 ----
        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 = rtl;
!       VARRAY_PUSH_RTX (used_rtx_varray, rtl);
        break;
  
*************** add_const_value_attribute (die, rtl)
*** 8624,8628 ****
      case LABEL_REF:
      case CONST:
!       add_AT_addr (die, DW_AT_const_value, save_rtx (rtl));
        break;
  
--- 8609,8614 ----
      case LABEL_REF:
      case CONST:
!       add_AT_addr (die, DW_AT_const_value, rtl);
!       VARRAY_PUSH_RTX (used_rtx_varray, rtl);
        break;
  
*************** add_name_and_src_coords_attributes (die,
*** 9366,9371 ****
       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)));
  #endif
  }
--- 9352,9360 ----
       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,
! 		   XEXP (DECL_RTL (decl), 0));
!       VARRAY_PUSH_RTX (used_rtx_varray, XEXP (DECL_RTL (decl), 0));
!     }
  #endif
  }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]