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] combine: Print insns we try to combine


This adds some extra debug info to the dump file for combine: print
the insns that are input to try_combine.  I was worried printing more
will make the dump file only harder to read, but especially the info
from the REG_DEAD notes is invaluable.

Committing to trunk.


Segher


2017-11-02  Segher Boessenkool  <segher@kernel.crashing.org>

	* combine (try_combine): Print the insns input to try_combine to the
	dump file.

---
 gcc/combine.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gcc/combine.c b/gcc/combine.c
index 5782013..910d4b0 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -2797,6 +2797,13 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0,
       else
 	fprintf (dump_file, "\nTrying %d -> %d:\n",
 		 INSN_UID (i2), INSN_UID (i3));
+
+      if (i0)
+	dump_insn_slim (dump_file, i0);
+      if (i1)
+	dump_insn_slim (dump_file, i1);
+      dump_insn_slim (dump_file, i2);
+      dump_insn_slim (dump_file, i3);
     }
 
   /* If multiple insns feed into one of I2 or I3, they can be in any
-- 
1.8.3.1


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