[ppc] Print debug log of rs6000 variable_issue invocations

Alexander Monakov amonakov@ispras.ru
Wed Dec 30 16:34:00 GMT 2009


This patch was useful when debugging scheduler behaviour on powerpc.
Certainly not a big deal, but I'd prefer to have it in mainline (it may be
useful again in future).

2009-12-30  Alexander Monakov  <amonakov@ispras.ru>

	* config/rs6000/rs6000.c (rs6000_variable_issue): Rename to...
	(rs6000_variable_issue_1): this.  Use...
	(rs6000_variable_issue): here.  Reimplement.  Print debug info.
---
 gcc/config/rs6000/rs6000.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index ee55fbb..b7546ab 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -21332,9 +21332,7 @@ static int load_store_pendulum;
    instructions to issue in this cycle.  */
 
 static int
-rs6000_variable_issue (FILE *stream ATTRIBUTE_UNUSED,
-		       int verbose ATTRIBUTE_UNUSED,
-		       rtx insn, int more)
+rs6000_variable_issue_1 (rtx insn, int more)
 {
   last_scheduled_insn = insn;
   if (GET_CODE (PATTERN (insn)) == USE
@@ -21373,6 +21371,15 @@ rs6000_variable_issue (FILE *stream ATTRIBUTE_UNUSED,
   return cached_can_issue_more;
 }
 
+static int
+rs6000_variable_issue (FILE *stream, int verbose, rtx insn, int more)
+{
+  int r = rs6000_variable_issue_1 (insn, more);
+  if (verbose)
+    fprintf (stream, "// rs6000_variable_issue (more = %d) = %d\n", more, r);
+  return r;
+}
+
 /* Adjust the cost of a scheduling dependency.  Return the new cost of
    a dependency LINK or INSN on DEP_INSN.  COST is the current cost.  */
 
-- 
1.6.4.3



More information about the Gcc-patches mailing list