From ff182b5cf78d6c7e70fc1eb75e87c8ba6f088325 Mon Sep 17 00:00:00 2001
From: DJ Delorie <dj@redhat.com>
Date: Thu, 19 Jan 2006 20:16:17 -0500
Subject: [PATCH] reload1.c (find_reload_regs): Note the details of reload
 failures in the dump file.

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

From-SVN: r110006
---
 gcc/ChangeLog | 6 ++++++
 gcc/reload1.c | 8 ++++++++
 2 files changed, 14 insertions(+)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 836da92b968e..ff3ba408dc59 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2006-01-19  DJ Delorie  <dj@redhat.com>
+
+	* reload1.c (find_reload_regs): Note the details of reload
+	failures in the dump file.
+	(spill_failure): Likewise.
+
 2006-01-20  Zdenek Dvorak <dvorakz@suse.cz>
 
 	* loop-iv.c: Include df.h and hashtab.h.
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 02fda092605d..56fed397320b 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -1831,6 +1831,8 @@ find_reload_regs (struct insn_chain *chain)
 	  && rld[r].regno == -1)
 	if (! find_reg (chain, i))
 	  {
+	    if (dump_file)
+	      fprintf(dump_file, "reload failure for reload %d\n", r);
 	    spill_failure (chain->insn, rld[r].class);
 	    failure = 1;
 	    return;
@@ -1899,6 +1901,12 @@ spill_failure (rtx insn, enum reg_class class)
     {
       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);
     }
 }
-- 
GitLab