tv: Remove mul_table[][][] and simply use * and <<.
[libfirm] / ir / ana / irscc.c
index a37b057..9658313 100644 (file)
@@ -318,7 +318,7 @@ static inline void pop_scc_unmark_visit(ir_node *n)
 static ir_loop *new_loop(void)
 {
        ir_loop *father = current_loop;
-       ir_loop *son    = alloc_loop(father, outermost_ir_graph->obst);
+       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;
@@ -360,7 +360,7 @@ static inline void finish_scc(void)
 }
 
 /**
- * Check weather a given node represents the outer most Start
+ * Check whether a given node represents the outermost Start
  * block. In intra-procedural view this is the start block of the
  * current graph, in interprocedural view it is the start block
  * of the outer most graph.
@@ -393,8 +393,8 @@ static inline int get_start_index(ir_node *n)
           means 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  ||
-           is_Block(n)              ||
+       if (is_Phi(n)   ||
+           is_Block(n) ||
            (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
@@ -425,9 +425,7 @@ static inline int get_start_index(ir_node *n)
  */
 static inline int is_possible_loop_head(ir_node *n)
 {
-       ir_op *op = get_irn_op(n);
-       return ((op == op_Block) ||
-               (op == op_Phi));
+       return is_Block(n) || is_Phi(n);
 }
 
 /**
@@ -774,9 +772,9 @@ int construct_backedges(ir_graph *irg)
        obstack_free(&temp, NULL);
 
        assert(head_rem == current_loop);
-       mature_loops(current_loop, irg->obst);
+       mature_loops(current_loop, get_irg_obstack(irg));
        set_irg_loop(irg, current_loop);
-       set_irg_state(irg, IR_GRAPH_STATE_CONSISTENT_LOOPINFO);
+       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;
@@ -818,7 +816,7 @@ void free_loop_information(ir_graph *irg)
        */
        irg_walk_graph(irg, loop_reset_node, NULL, NULL);
        set_irg_loop(irg, NULL);
-       clear_irg_state(current_ir_graph, IR_GRAPH_STATE_CONSISTENT_LOOPINFO);
+       clear_irg_properties(current_ir_graph, IR_GRAPH_PROPERTY_CONSISTENT_LOOPINFO);
        /* We cannot free the loop nodes, they are on the obstack. */
 }