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]

[patch] reload1: detail reload failures in dump file


I've been using this patch for a while now.  It just dumps details of
reload failures to the dump file to ease debugging.  Passes
bootstrap/test on the 4.1 branch.  Ok to apply?

	* reload1.c (find_reload_regs): Note the details of reload
	failures in the dump file.
	(spill_failure): Likewise.

Index: gcc/reload1.c
===================================================================
*** gcc/reload1.c	(revision 108596)
--- gcc/reload1.c	(working copy)
*************** find_reload_regs (struct insn_chain *cha
*** 1831,1834 ****
--- 1831,1836 ----
  	if (! find_reg (chain, i))
  	  {
+ 	    if (dump_file)
+ 	      fprintf(dump_file, "reload failure for reload %d\n", i);
  	    spill_failure (chain->insn, rld[r].class);
  	    failure = 1;
*************** spill_failure (rtx insn, enum reg_class 
*** 1899,1902 ****
--- 1901,1910 ----
        error ("unable to find a register to spill in class %qs",
  	     reg_class_names[class]);
+ 
+       if (dump_file)
+ 	{
+ 	  fprintf (dump_file, "\nReloads for insn # %d\n", INSN_UID (insn));
+ 	  debug_reload_to_stream (dump_file);
+ 	}
        fatal_insn ("this is the insn:", insn);
      }


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