- set_irn_link(list->end, block);
- list->end = block;
- }
-
- list->n_blks++;
-}
-
-static void create_block_list(ir_node *leader_block, anchor *list) {
- int i;
- ir_node *block = NULL;
- const ir_edge_t *edge;
-
- ir_extblk *extbb = get_Block_extbb(leader_block);
- if(extbb_visited(extbb))
- return;
- mark_extbb_visited(extbb);
-
- for(i = 0; i < get_extbb_n_blocks(extbb); ++i) {
- block = get_extbb_block(extbb, i);
- add_block(list, block);
- }
-
- assert(block != NULL);
-
- // pick successor extbbs
- foreach_block_succ(block, edge) {
- ir_node *succ = get_edge_src_irn(edge);
-
- create_block_list(succ, list);
- }
-
- for(i = 0; i < get_extbb_n_blocks(extbb) - 1; ++i) {
- block = get_extbb_block(extbb, i);
- foreach_block_succ(block, edge) {
- ir_node *succ = get_edge_src_irn(edge);
-
- create_block_list(succ, list);
+ if (is_Block(from))
+ from = sched_prev(from);
+ for (curr = from; curr != bl && predicator(curr, data); curr = sched_prev(curr)) {