[SMS] Minor misc. fixes

Submitted by Revital Eres on Sept. 8, 2011, 7:59 a.m.

Details

Message ID CAHz1=dVAc0eYqSYt=0ODetANs4gJXt5KaUM5yRG2j4QSJg-LBg@mail.gmail.com
State New
Headers show

Commit Message

Revital Eres Sept. 8, 2011, 7:59 a.m.
Hello,

The attached patch contains minor fixes.

Currently testing and bootstrap on ppc64-redhat-linux enabling SMS on
loops with SC 1.

OK for mainline once testing completes?

Thanks,
Revital


Changelog

        * modulo-sched.c (optimize_sc): Call remove_node_from_ps outside
        of gcc_assert.
        (sms_schedule): Add print info.

Comments

Ayal Zaks Sept. 11, 2011, 11:25 p.m.
Copying the lists..

‎---------- Forwarded message ----------‎
From: Ayal Zaks ‎<ayal.zaks@gmail.com>‎
Date: 2011/9/11
Subject: Re: [PATCH, SMS] Minor misc. fixes
To: Revital Eres ‫revital.eres@linaro.org‬


2011/9/8 Revital Eres <revital.eres@linaro.org>
>
> Hello,
>
> The attached patch contains minor fixes.
>
> Currently testing and bootstrap on ppc64-redhat-linux enabling SMS on
> loops with SC 1.
>
> OK for mainline once testing completes?


OK.
While we're at it, an alternative would be to have
remove_node_from_ps() assert its own (parameters and) return value.
That is, replace "if (c) return false" by "assert (!c)" and have it
return void if successful. There's not much you can do if it returns
false. That would check its other invocation too.

Ayal.


>
> Thanks,
> Revital
>
>
> Changelog
>
>        * modulo-sched.c (optimize_sc): Call remove_node_from_ps outside
>        of gcc_assert.
>        (sms_schedule): Add print info.

Patch hide | download patch | download mbox

Index: modulo-sched.c
===================================================================
--- modulo-sched.c	(revision 178632)
+++ modulo-sched.c	(working copy)
@@ -773,7 +773,7 @@  optimize_sc (partial_schedule_ptr ps, dd
   if (get_sched_window (ps, g->closing_branch, sched_nodes, ii, &start,
 			&step, &end) == 0)
     {
-      bool success;
+      bool success, remove_branch_p;
       ps_insn_ptr next_ps_i;
       int branch_cycle = SCHED_TIME (g->closing_branch);
       int row = SMODULO (branch_cycle, ps->ii);
@@ -835,7 +835,8 @@  optimize_sc (partial_schedule_ptr ps, dd
 	  break;
 
       gcc_assert (next_ps_i);
-      gcc_assert (remove_node_from_ps (ps, next_ps_i));
+      remove_branch_p = remove_node_from_ps (ps, next_ps_i);
+      gcc_assert (remove_branch_p);
       success =
 	try_scheduling_node_in_cycle (ps, g->closing_branch,
 				      g->closing_branch->cuid, c,
@@ -1485,8 +1486,8 @@  sms_schedule (void)
           if (dump_file)
             {
 	      fprintf (dump_file,
-		       "SMS succeeded %d %d (with ii, sc)\n", ps->ii,
-		       stage_count);
+		       "%s:%d SMS succeeded %d %d (with ii, sc)\n",
+		       insn_file (tail), insn_line (tail), ps->ii, stage_count);
 	      print_partial_schedule (ps, dump_file);
 	    }