removed two warnings
[libfirm] / ir / be / besched.c
index d498843..beb3885 100644 (file)
@@ -32,6 +32,8 @@ FIRM_IMPL1(sched_first, ir_node *, const ir_node *)
 FIRM_IMPL1(sched_last, ir_node *, const ir_node *)
 FIRM_IMPL2(sched_add_after, ir_node *, ir_node *, ir_node *)
 FIRM_IMPL2(sched_add_before, ir_node *, ir_node *, ir_node *)
+FIRM_IMPL1_VOID(sched_init_block, ir_node *)
+FIRM_IMPL1_VOID(sched_reset, ir_node *)
 FIRM_IMPL2(sched_comes_after, int, const ir_node *, const ir_node *)
 FIRM_IMPL1_VOID(sched_remove, ir_node *)
 
@@ -205,91 +207,7 @@ ir_node *sched_skip(ir_node *from, int forward, sched_predicator_t *predicator,
        return curr;
 }
 
-/** A simple forward single linked list. */
-typedef struct {
-       ir_node *start;   /**< start of the list */
-       ir_node *end;     /**< last block in the list */
-       unsigned n_blks;  /**< number of blocks in the list */
-} anchor;
-
-static void add_block(anchor *list, ir_node *block) {
-       if(list->start == NULL) {
-               list->start = block;
-               list->end = block;
-       } else {
-               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);
-               }
-       }
-}
-
-void compute_extbb_execfreqs(ir_graph *irg, exec_freq_t *execfreqs);
-
-/*
- * Calculates a block schedule. The schedule is stored as a linked
- * list starting at the start_block of the irg.
- */
-ir_node **sched_create_block_schedule(ir_graph *irg, exec_freq_t *execfreqs)
-{
-       anchor list;
-       ir_node **blk_list, *b, *n;
-       unsigned i;
-
-       /* schedule extended basic blocks */
-       compute_extbb_execfreqs(irg, execfreqs);
-       //compute_extbb(irg);
-
-       list.start  = NULL;
-       list.end    = NULL;
-       list.n_blks = 0;
-       inc_irg_block_visited(irg);
-       create_block_list(get_irg_start_block(irg), &list);
-
-       /** create an array, so we can go forward and backward */
-       blk_list = NEW_ARR_D(ir_node *, irg->obst,list.n_blks);
-
-       for (i = 0, b = list.start; b; b = n, ++i) {
-               n = get_irn_link(b);
-               blk_list[i] = b;
-       }
-
-       return blk_list;
-}
+//---------------------------------------------------------------------------
 
 typedef struct remove_dead_nodes_env_t_ {
        ir_graph *irg;