Commit 337d8094 authored by Matthias Braun's avatar Matthias Braun
Browse files

remove unused support for max_loop_depth

parent 220d7f08
......@@ -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.
......
......@@ -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)
......
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment