summaryrefslogtreecommitdiffstats
path: root/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106814.patch
blob: 91b2191cb82fe21aaeeb1045d305ca4b20ec6993 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
2011-09-22  Revital Eres  <revital.eres@linaro.org>

	gcc/
	Backport from trunk -r178804:
	modulo-sched.c (remove_node_from_ps): Return void
	instead of bool.
	(optimize_sc): Adjust call to remove_node_from_ps.
	(sms_schedule): Add print info.

=== modified file 'gcc/modulo-sched.c'
--- old/gcc/modulo-sched.c	2011-08-09 04:51:48 +0000
+++ new/gcc/modulo-sched.c	2011-09-14 11:06:06 +0000
@@ -211,7 +211,7 @@
 static bool try_scheduling_node_in_cycle (partial_schedule_ptr, ddg_node_ptr,
 					  int, int, sbitmap, int *, sbitmap,
 					  sbitmap);
-static bool remove_node_from_ps (partial_schedule_ptr, ps_insn_ptr);
+static void remove_node_from_ps (partial_schedule_ptr, ps_insn_ptr);
 
 #define SCHED_ASAP(x) (((node_sched_params_ptr)(x)->aux.info)->asap)
 #define SCHED_TIME(x) (((node_sched_params_ptr)(x)->aux.info)->time)
@@ -834,8 +834,7 @@
 	if (next_ps_i->node->cuid == g->closing_branch->cuid)
 	  break;
 
-      gcc_assert (next_ps_i);
-      gcc_assert (remove_node_from_ps (ps, next_ps_i));
+      remove_node_from_ps (ps, next_ps_i);
       success =
 	try_scheduling_node_in_cycle (ps, g->closing_branch,
 				      g->closing_branch->cuid, c,
@@ -1485,8 +1484,8 @@
           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);
 	    }
  
@@ -2810,22 +2809,18 @@
 }
 
 
-/* Removes the given PS_INSN from the partial schedule.  Returns false if the
-   node is not found in the partial schedule, else returns true.  */
-static bool
+/* Removes the given PS_INSN from the partial schedule.  */  
+static void 
 remove_node_from_ps (partial_schedule_ptr ps, ps_insn_ptr ps_i)
 {
   int row;
 
-  if (!ps || !ps_i)
-    return false;
-
+  gcc_assert (ps && ps_i);
+  
   row = SMODULO (ps_i->cycle, ps->ii);
   if (! ps_i->prev_in_row)
     {
-      if (ps_i != ps->rows[row])
-	return false;
-
+      gcc_assert (ps_i == ps->rows[row]);
       ps->rows[row] = ps_i->next_in_row;
       if (ps->rows[row])
 	ps->rows[row]->prev_in_row = NULL;
@@ -2839,7 +2834,7 @@
    
   ps->rows_length[row] -= 1; 
   free (ps_i);
-  return true;
+  return;
 }
 
 /* Unlike what literature describes for modulo scheduling (which focuses