Lines Matching refs:before
129 void add_dep(schedule_node *before, schedule_node *after, int latency);
130 void add_dep(schedule_node *before, schedule_node *after);
163 * The @after node will be scheduled after @before. We will try to
164 * schedule it @latency cycles after @before, but no guarantees there.
167 instruction_scheduler::add_dep(schedule_node *before, schedule_node *after,
170 if (!before || !after)
173 assert(before != after);
175 for (int i = 0; i < before->child_count; i++) {
176 if (before->children[i] == after) {
177 before->child_latency[i] = MAX2(before->child_latency[i], latency);
182 if (before->child_array_size <= before->child_count) {
183 if (before->child_array_size < 16)
184 before->child_array_size = 16;
186 before->child_array_size *= 2;
188 before->children = reralloc(mem_ctx, before->children,
190 before->child_array_size);
191 before->child_latency = reralloc(mem_ctx, before->child_latency,
192 int, before->child_array_size);
195 before->children[before->child_count] = after;
196 before->child_latency[before->child_count] = latency;
197 before->child_count++;
202 instruction_scheduler::add_dep(schedule_node *before, schedule_node *after)
204 if (!before)
207 add_dep(before, after, before->latency);
212 * was before it and before everything that followed it. This adds