- worklist = new_worklist();
- } else {
- worklist = duplicate_activate_worklist(worklist, block, best_succ_block,
- best_pos);
+ if (best_worklist == NULL)
+ return false;
+ best_worklist->visited = worklist_visited;
+
+ fill_and_activate_worklist(new_worklist, best_worklist, block,
+ best_succ_block, best_pos);
+ return true;
+}
+
+static worklist_t *construct_start_worklist(ir_node *block)
+{
+ worklist_t *worklist = new_worklist();
+
+ ++worklist_visited;
+
+ while(fill_start_worklist(worklist, block)) {
+ if (worklist->n_live_values >= n_regs)
+ break;