summaryrefslogtreecommitdiffstats
path: root/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106771.patch
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106771.patch')
-rw-r--r--toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106771.patch211
1 files changed, 0 insertions, 211 deletions
diff --git a/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106771.patch b/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106771.patch
deleted file mode 100644
index 70c8638cd2..0000000000
--- a/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106771.patch
+++ /dev/null
@@ -1,211 +0,0 @@
12011-07-11 Revital Eres <revital.eres@linaro.org>
2
3 Backport from mainline -r175091
4 gcc/
5 * modulo-sched.c (struct ps_insn): Remove row_rest_count
6 field.
7 (struct partial_schedule): Add rows_length field.
8 (verify_partial_schedule): Check rows_length.
9 (ps_insert_empty_row): Handle rows_length.
10 (create_partial_schedule): Likewise.
11 (free_partial_schedule): Likewise.
12 (reset_partial_schedule): Likewise.
13 (create_ps_insn): Remove rest_count argument.
14 (remove_node_from_ps): Update rows_length.
15 (add_node_to_ps): Update rows_length and call create_ps_insn without
16 passing row_rest_count.
17 (rotate_partial_schedule): Update rows_length.
18
19=== modified file 'gcc/modulo-sched.c'
20--- old/gcc/modulo-sched.c 2011-05-13 16:03:40 +0000
21+++ new/gcc/modulo-sched.c 2011-07-04 12:01:34 +0000
22@@ -134,8 +134,6 @@
23 ps_insn_ptr next_in_row,
24 prev_in_row;
25
26- /* The number of nodes in the same row that come after this node. */
27- int row_rest_count;
28 };
29
30 /* Holds the partial schedule as an array of II rows. Each entry of the
31@@ -149,6 +147,12 @@
32 /* rows[i] points to linked list of insns scheduled in row i (0<=i<ii). */
33 ps_insn_ptr *rows;
34
35+ /* rows_length[i] holds the number of instructions in the row.
36+ It is used only (as an optimization) to back off quickly from
37+ trying to schedule a node in a full row; that is, to avoid running
38+ through futile DFA state transitions. */
39+ int *rows_length;
40+
41 /* The earliest absolute cycle of an insn in the partial schedule. */
42 int min_cycle;
43
44@@ -1907,6 +1911,7 @@
45 int ii = ps->ii;
46 int new_ii = ii + 1;
47 int row;
48+ int *rows_length_new;
49
50 verify_partial_schedule (ps, sched_nodes);
51
52@@ -1921,9 +1926,11 @@
53 rotate_partial_schedule (ps, PS_MIN_CYCLE (ps));
54
55 rows_new = (ps_insn_ptr *) xcalloc (new_ii, sizeof (ps_insn_ptr));
56+ rows_length_new = (int *) xcalloc (new_ii, sizeof (int));
57 for (row = 0; row < split_row; row++)
58 {
59 rows_new[row] = ps->rows[row];
60+ rows_length_new[row] = ps->rows_length[row];
61 ps->rows[row] = NULL;
62 for (crr_insn = rows_new[row];
63 crr_insn; crr_insn = crr_insn->next_in_row)
64@@ -1944,6 +1951,7 @@
65 for (row = split_row; row < ii; row++)
66 {
67 rows_new[row + 1] = ps->rows[row];
68+ rows_length_new[row + 1] = ps->rows_length[row];
69 ps->rows[row] = NULL;
70 for (crr_insn = rows_new[row + 1];
71 crr_insn; crr_insn = crr_insn->next_in_row)
72@@ -1965,6 +1973,8 @@
73 + (SMODULO (ps->max_cycle, ii) >= split_row ? 1 : 0);
74 free (ps->rows);
75 ps->rows = rows_new;
76+ free (ps->rows_length);
77+ ps->rows_length = rows_length_new;
78 ps->ii = new_ii;
79 gcc_assert (ps->min_cycle >= 0);
80
81@@ -2040,16 +2050,23 @@
82 ps_insn_ptr crr_insn;
83
84 for (row = 0; row < ps->ii; row++)
85- for (crr_insn = ps->rows[row]; crr_insn; crr_insn = crr_insn->next_in_row)
86- {
87- ddg_node_ptr u = crr_insn->node;
88-
89- gcc_assert (TEST_BIT (sched_nodes, u->cuid));
90- /* ??? Test also that all nodes of sched_nodes are in ps, perhaps by
91- popcount (sched_nodes) == number of insns in ps. */
92- gcc_assert (SCHED_TIME (u) >= ps->min_cycle);
93- gcc_assert (SCHED_TIME (u) <= ps->max_cycle);
94- }
95+ {
96+ int length = 0;
97+
98+ for (crr_insn = ps->rows[row]; crr_insn; crr_insn = crr_insn->next_in_row)
99+ {
100+ ddg_node_ptr u = crr_insn->node;
101+
102+ length++;
103+ gcc_assert (TEST_BIT (sched_nodes, u->cuid));
104+ /* ??? Test also that all nodes of sched_nodes are in ps, perhaps by
105+ popcount (sched_nodes) == number of insns in ps. */
106+ gcc_assert (SCHED_TIME (u) >= ps->min_cycle);
107+ gcc_assert (SCHED_TIME (u) <= ps->max_cycle);
108+ }
109+
110+ gcc_assert (ps->rows_length[row] == length);
111+ }
112 }
113
114
115@@ -2455,6 +2472,7 @@
116 {
117 partial_schedule_ptr ps = XNEW (struct partial_schedule);
118 ps->rows = (ps_insn_ptr *) xcalloc (ii, sizeof (ps_insn_ptr));
119+ ps->rows_length = (int *) xcalloc (ii, sizeof (int));
120 ps->ii = ii;
121 ps->history = history;
122 ps->min_cycle = INT_MAX;
123@@ -2493,6 +2511,7 @@
124 return;
125 free_ps_insns (ps);
126 free (ps->rows);
127+ free (ps->rows_length);
128 free (ps);
129 }
130
131@@ -2510,6 +2529,8 @@
132 ps->rows = (ps_insn_ptr *) xrealloc (ps->rows, new_ii
133 * sizeof (ps_insn_ptr));
134 memset (ps->rows, 0, new_ii * sizeof (ps_insn_ptr));
135+ ps->rows_length = (int *) xrealloc (ps->rows_length, new_ii * sizeof (int));
136+ memset (ps->rows_length, 0, new_ii * sizeof (int));
137 ps->ii = new_ii;
138 ps->min_cycle = INT_MAX;
139 ps->max_cycle = INT_MIN;
140@@ -2538,14 +2559,13 @@
141
142 /* Creates an object of PS_INSN and initializes it to the given parameters. */
143 static ps_insn_ptr
144-create_ps_insn (ddg_node_ptr node, int rest_count, int cycle)
145+create_ps_insn (ddg_node_ptr node, int cycle)
146 {
147 ps_insn_ptr ps_i = XNEW (struct ps_insn);
148
149 ps_i->node = node;
150 ps_i->next_in_row = NULL;
151 ps_i->prev_in_row = NULL;
152- ps_i->row_rest_count = rest_count;
153 ps_i->cycle = cycle;
154
155 return ps_i;
156@@ -2578,6 +2598,8 @@
157 if (ps_i->next_in_row)
158 ps_i->next_in_row->prev_in_row = ps_i->prev_in_row;
159 }
160+
161+ ps->rows_length[row] -= 1;
162 free (ps_i);
163 return true;
164 }
165@@ -2734,17 +2756,12 @@
166 sbitmap must_precede, sbitmap must_follow)
167 {
168 ps_insn_ptr ps_i;
169- int rest_count = 1;
170 int row = SMODULO (cycle, ps->ii);
171
172- if (ps->rows[row]
173- && ps->rows[row]->row_rest_count >= issue_rate)
174+ if (ps->rows_length[row] >= issue_rate)
175 return NULL;
176
177- if (ps->rows[row])
178- rest_count += ps->rows[row]->row_rest_count;
179-
180- ps_i = create_ps_insn (node, rest_count, cycle);
181+ ps_i = create_ps_insn (node, cycle);
182
183 /* Finds and inserts PS_I according to MUST_FOLLOW and
184 MUST_PRECEDE. */
185@@ -2754,6 +2771,7 @@
186 return NULL;
187 }
188
189+ ps->rows_length[row] += 1;
190 return ps_i;
191 }
192
193@@ -2909,11 +2927,16 @@
194 for (i = 0; i < backward_rotates; i++)
195 {
196 ps_insn_ptr first_row = ps->rows[0];
197+ int first_row_length = ps->rows_length[0];
198
199 for (row = 0; row < last_row; row++)
200- ps->rows[row] = ps->rows[row+1];
201+ {
202+ ps->rows[row] = ps->rows[row + 1];
203+ ps->rows_length[row] = ps->rows_length[row + 1];
204+ }
205
206 ps->rows[last_row] = first_row;
207+ ps->rows_length[last_row] = first_row_length;
208 }
209
210 ps->max_cycle -= start_cycle;
211