This is the mail archive of the 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] Improve combine dumpfile

Rask not too long ago added support to combine to print the patterns that are
being matched.  This is mostly useful to answer the question of what patterns
should possibly be added to the .md file.

Unfortunately it does not print the UIDs of the insns being combined so it's
still hard to answer the other common question of why some particular insns
weren't merged?

The patch below adds printing of the INSN_UIDs in try_combine.

Bootstrapped and tested on x86_64_linux.



	* combine.c (try_combine): Dump information about the insns we're

Index: gcc/combine.c
--- gcc.orig/combine.c	2009-06-22 08:58:43.000000000 -0700
+++ gcc/combine.c	2009-06-22 09:10:30.000000000 -0700
@@ -2256,6 +2256,16 @@ try_combine (rtx i3, rtx i2, rtx i1, int
   /* Reset the hard register usage information.  */
   CLEAR_HARD_REG_SET (newpat_used_regs);
+  if (dump_file && (dump_flags & TDF_DETAILS))
+    {
+      if (i1)
+	fprintf (dump_file, "\nTrying %d, %d -> %d:\n",
+		 INSN_UID (i1), INSN_UID (i2), INSN_UID (i3));
+      else
+	fprintf (dump_file, "\nTrying %d -> %d:\n",
+		 INSN_UID (i2), INSN_UID (i3));
+    }
   /* If I1 and I2 both feed I3, they can be in any order.  To simplify the
      code below, set I1 to be the earlier of the two insns.  */
   if (i1 && DF_INSN_LUID (i1) > DF_INSN_LUID (i2))

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