X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fana%2Firscc.c;h=3c1777f6abe2b069ee4de402905a272b4eb05f0b;hb=00894f1e0b6e74ca6c12d253dd30f7d873808977;hp=b97fd0d6793d6b0d395124bbc72a62228a2aa317;hpb=798d009ee0078bf37b0dae9ce156ef3d20d86d88;p=libfirm diff --git a/ir/ana/irscc.c b/ir/ana/irscc.c index b97fd0d67..3c1777f6a 100644 --- a/ir/ana/irscc.c +++ b/ir/ana/irscc.c @@ -209,24 +209,13 @@ static INLINE void init_stack(void) { tos = 0; } -static void finish_stack(void) -{ - DEL_ARR_F(stack); - stack = NULL; -} - -#if 0 /** * Frees the stack. */ -static INLINE void free_stack(void) { - if (stack != NULL) { - DEL_ARR_F(stack); - stack = NULL; - } - tos = 0; +static void finish_stack(void) { + DEL_ARR_F(stack); + stack = NULL; } -#endif /** * push a node onto the stack @@ -404,11 +393,12 @@ static INLINE int get_start_index(ir_node *n) { not reachable. I.e., with this code, the order on the loop tree is correct. But a (single) test showed the loop tree is deeper. */ - if (get_irn_op(n) == op_Phi || - get_irn_op(n) == op_Block || - (get_irn_op(n) == op_Filter && get_interprocedural_view()) || - (get_irg_pinned(get_irn_irg(n)) == op_pin_state_floats && - get_irn_pinned(n) == op_pin_state_floats)) + if (get_irn_op(n) == op_Phi || + is_Block(n) || + (is_Filter(n) && get_interprocedural_view()) || ( + get_irg_pinned(get_irn_irg(n)) == op_pin_state_floats && + get_irn_pinned(n) == op_pin_state_floats + )) // Here we could test for backedge at -1 which is illegal return 0; else @@ -421,7 +411,7 @@ static INLINE int get_start_index(ir_node *n) { But it guarantees that Blocks are analysed before nodes contained in the block. If so, we can set the value to undef if the block is not \ executed. */ - if (is_cfop(n) || is_fragile_op(n) || get_irn_op(n) == op_Start) + if (is_cfop(n) || is_fragile_op(n) || is_Start(n)) return -1; else return 0; @@ -461,6 +451,8 @@ static int is_head(ir_node *n, ir_node *root) { if (!is_outermost_Start(n)) { #ifndef NDEBUG int uplink = get_irn_uplink(root); +#else + (void) root; #endif arity = get_irn_arity(n); for (i = get_start_index(n); i < arity; i++) { @@ -498,6 +490,8 @@ static int is_endless_head(ir_node *n, ir_node *root) { if (!is_outermost_Start(n)) { #ifndef NDEBUG int uplink = get_irn_uplink(root); +#else + (void) root; #endif arity = get_irn_arity(n); for (i = get_start_index(n); i < arity; i++) { @@ -721,9 +715,8 @@ static INLINE int is_outermost_loop(ir_loop *l) { * @param n node to start */ static void scc(ir_node *n) { - if (irn_visited(n)) + if (irn_visited_else_mark(n)) return; - mark_irn_visited(n); /* Initialize the node */ set_irn_dfn(n, current_dfn); /* Depth first number for this node */ @@ -822,9 +815,8 @@ static void scc(ir_node *n) { #ifdef INTERPROCEDURAL_VIEW static void my_scc(ir_node *n) { int i; - if (irn_visited(n)) + if (irn_visited_else_mark(n)) return; - mark_irn_visited(n); /* Initialize the node */ set_irn_dfn(n, current_dfn); /* Depth first number for this node */ @@ -844,7 +836,7 @@ static void my_scc(ir_node *n) { ir_node *m; if (is_backedge(n, i)) continue; m = get_irn_n(n, i); /* get_irn_ip_pred(n, i); */ - /* if ((!m) || (get_irn_op(m) == op_Unknown)) continue; */ + /* if (!m || is_Unknown(m)) continue; */ my_scc(m); if (irn_is_in_stack(m)) { /* Uplink of m is smaller if n->m is a backedge.