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]

Re: Reformatting and minor code changes for dwarf2out.c


- 	{
- 	  rtx x = XVECEXP (expr, 0, par_index);
- 
- 	  if (GET_CODE (x) == SET &&
- 	      (RTX_FRAME_RELATED_P (x) || par_index == 0))
- 	    dwarf2out_frame_debug_expr (x, label);
- 	}
+ 	if (GET_CODE (XVECEXP (expr, 0, par_index)) == SET
+ 	    && (RTX_FRAME_RELATED_P (XVECEXP (expr, 0, par_index))
+ 		|| par_index == 0))
+ 	  dwarf2out_frame_debug_expr (XVECEXP (expr, 0, par_index), label);

Please do not un-factor code like this.  I find the later much
harder to read.  In addition, with ENABLE_RTL_CHECKING, this
runs slower.

-   {
-     const char *p = lbasename (get_AT_string (unit_die, DW_AT_name));
-     name = (char *) alloca (strlen (p) + 64);
-     sprintf (name, "%s.", p);
-   }
+   p = (char *) lbasename (get_AT_string (unit_die, DW_AT_name));
+   name = (char *) alloca (strlen (p) + 64);
+   sprintf (name, "%s.", p);

You are undoing Kaveh's work to eliminate -Wcast-qual warnings.
Please don't.
  
- /* Remember a type in the incomplete_types_list.  */
- static void
- add_incomplete_type (type)
-      tree type;
- {
-   VARRAY_PUSH_TREE (incomplete_types, type);
- }

Why?  Yes, it was used one place, so what?  Mark it inline if you must.

-   if (TREE_CODE (decl) == ERROR_MARK)
-     return;
- 
-   /* If this ..._DECL node is marked to be ignored, then ignore it.  */
    if (DECL_IGNORED_P (decl))

So you've proven then that we won't get error_mark_node here
and crash with ENABLE_TREE_CHECKING on the DECL_IGNORED_P?

Three occurrences of this.

And, as with any change to one of the debug emitters, you ran
the GDB testsuite to verify no regressions as well, right?


r~


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