remove unused support for max_loop_depth
authorMatthias Braun <matze@braunis.de>
Tue, 4 Dec 2012 00:42:55 +0000 (01:42 +0100)
committerMatthias Braun <matze@braunis.de>
Tue, 4 Dec 2012 17:15:02 +0000 (18:15 +0100)
include/libfirm/irloop.h
ir/ana/ircfscc.c
ir/ana/irscc.c

index 1cc507a..78fc0e7 100644 (file)
@@ -106,8 +106,6 @@ FIRM_API void *get_loop_link(const ir_loop *loop);
  *
  *  This algorithm destoyes the link field of block nodes.
  *
- *  @returns Maximal depth of loop tree.
- *
  *  @remark
  *  One assumes, the Phi nodes in a block with a backedge have backedges
  *  at the same positions as the block.  This is not the case, as
@@ -117,7 +115,7 @@ FIRM_API void *get_loop_link(const ir_loop *loop);
  *  edges, the cycle is removed.  The second Phi node does not get a
  *  backedge!
  */
-FIRM_API int construct_backedges(ir_graph *irg);
+FIRM_API void construct_backedges(ir_graph *irg);
 
 /**
  * Construct Intra-procedural control flow loop tree for a IR-graph.
@@ -132,10 +130,8 @@ FIRM_API int construct_backedges(ir_graph *irg);
  * This algorithm destroyes the link field of block nodes.
  *
  * @param irg  the graph
- *
- * @returns Maximal depth of loop tree.
  */
-FIRM_API int construct_cf_backedges(ir_graph *irg);
+FIRM_API void construct_cf_backedges(ir_graph *irg);
 
 /**
  * Computes Intra-procedural control flow loop tree on demand.
index 289b7aa..415323c 100644 (file)
@@ -51,8 +51,6 @@ static int loop_node_cnt = 0;
 /** Counter to generate depth first numbering of visited nodes. */
 static int current_dfn = 1;
 
-static unsigned max_loop_depth = 0;
-
 /**********************************************************************/
 /* Node attributes needed for the construction.                      **/
 /**********************************************************************/
@@ -262,7 +260,6 @@ static ir_loop *new_loop(void)
        ir_loop *father = current_loop;
        ir_loop *son    = alloc_loop(father, get_irg_obstack(outermost_ir_graph));
 
-       if (son->depth > max_loop_depth) max_loop_depth = son->depth;
        current_loop = son;
        return father;
 }
@@ -593,15 +590,13 @@ static void cfscc(ir_node *n)
        }
 }
 
-int construct_cf_backedges(ir_graph *irg)
+void construct_cf_backedges(ir_graph *irg)
 {
        ir_loop *head_rem;
        ir_node *end = get_irg_end(irg);
        struct obstack temp;
        int i;
 
-       max_loop_depth = 0;
-
        outermost_ir_graph = irg;
 
        obstack_init(&temp);
@@ -627,8 +622,6 @@ int construct_cf_backedges(ir_graph *irg)
        mature_loops(current_loop, get_irg_obstack(irg));
        set_irg_loop(irg, current_loop);
        add_irg_properties(irg, IR_GRAPH_PROPERTY_CONSISTENT_LOOPINFO);
-
-       return max_loop_depth;
 }
 
 void assure_loopinfo(ir_graph *irg)
index 9879ceb..68df00c 100644 (file)
@@ -54,8 +54,6 @@ static int loop_node_cnt = 0;
 /** Counter to generate depth first numbering of visited nodes. */
 static int current_dfn = 1;
 
-static unsigned max_loop_depth = 0;
-
 /**********************************************************************/
 /* Node attributes needed for the construction.                      **/
 /**********************************************************************/
@@ -308,7 +306,6 @@ static ir_loop *new_loop(void)
        ir_loop *father = current_loop;
        ir_loop *son    = alloc_loop(father, get_irg_obstack(outermost_ir_graph));
 
-       if (son->depth > max_loop_depth) max_loop_depth = son->depth;
        current_loop = son;
        return father;
 }
@@ -726,13 +723,12 @@ static void scc(ir_node *n)
        }
 }
 
-int construct_backedges(ir_graph *irg)
+void construct_backedges(ir_graph *irg)
 {
        ir_graph *rem = current_ir_graph;
        ir_loop *head_rem;
        struct obstack temp;
 
-       max_loop_depth = 0;
        current_ir_graph   = irg;
        outermost_ir_graph = irg;
 
@@ -756,7 +752,6 @@ int construct_backedges(ir_graph *irg)
        add_irg_properties(irg, IR_GRAPH_PROPERTY_CONSISTENT_LOOPINFO);
        assert(get_irg_loop(irg)->kind == k_ir_loop);
        current_ir_graph = rem;
-       return max_loop_depth;
 }
 
 static void reset_backedges(ir_node *n)