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]

[df] enhance dump text


I added this to help me understand what df was doing, but I thought it
would be helpful to others as well.  Ok?

	* df-scan.c (df_insn_change_bb): Print relevent register
	numbers to the dump file.

Index: df-scan.c
===================================================================
--- df-scan.c	(revision 141617)
+++ df-scan.c	(working copy)
@@ -1945,24 +1945,26 @@ df_insn_change_bb (rtx insn, basic_block
 static void
 df_ref_change_reg_with_loc_1 (struct df_reg_info *old_df, 
 			      struct df_reg_info *new_df,
 			      int new_regno, rtx loc)
 {
   df_ref the_ref = old_df->reg_chain;
+  int old_regno;
 
   while (the_ref)
     {
       if ((!DF_REF_IS_ARTIFICIAL (the_ref))
 	  && (DF_REF_LOC (the_ref))
 	  && (*DF_REF_LOC (the_ref) == loc))
 	{
 	  df_ref next_ref = DF_REF_NEXT_REG (the_ref);
 	  df_ref prev_ref = DF_REF_PREV_REG (the_ref);
 	  df_ref *ref_vec, *ref_vec_t;
 	  struct df_insn_info *insn_info = DF_REF_INSN_INFO (the_ref);
 	  unsigned int count = 0;
+	  old_regno = DF_REF_REGNO (the_ref);
 
 	  DF_REF_REGNO (the_ref) = new_regno;
 	  DF_REF_REG (the_ref) = regno_reg_rtx[new_regno];
 
 	  /* Pull the_ref out of the old regno chain.  */
 	  if (prev_ref)
@@ -1988,14 +1990,14 @@ df_ref_change_reg_with_loc_1 (struct df_
 	     record.  */
 	  if (DF_REF_FLAGS (the_ref) & DF_REF_IN_NOTE)
 	    ref_vec = insn_info->eq_uses;
 	  else
 	    ref_vec = insn_info->uses;
 	  if (dump_file)
-	    fprintf (dump_file, "changing reg in insn %d\n", 
-		     DF_REF_INSN_UID (the_ref)); 
+	    fprintf (dump_file, "changing reg %d to %d in insn %d\n", 
+		     old_regno, new_regno, DF_REF_INSN_UID (the_ref)); 
       
 	  ref_vec_t = ref_vec;
 	  
 	  /* Find the length.  */
 	  while (*ref_vec_t)
 	    {


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