fprintf(stderr, " (%d cost)\n",
get_register_pressure_cost(state, n->inst));
- util_dynarray_foreach(&n->dag.children, struct schedule_node *,
- childp) {
- struct schedule_node *child = *childp;
+ util_dynarray_foreach(&n->dag.edges, struct dag_edge, edge) {
+ struct schedule_node *child =
+ (struct schedule_node *)edge->child;
fprintf(stderr, " - ");
qir_dump_inst(c, child->inst);
fprintf(stderr, " (%d parents)\n",
}
state->time = 0;
- while (!list_empty(&state->dag->heads)) {
+ while (!list_is_empty(&state->dag->heads)) {
struct schedule_node *chosen = choose_instruction(state);
struct qinst *inst = chosen->inst;