This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] reload1: detail reload failures in dump file
- From: DJ Delorie <dj at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 15 Dec 2005 21:38:03 -0500
- Subject: [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);
}