- add support for statistics and merge debug info
[libfirm] / ir / ana / irouts.c
index f288447..3825146 100644 (file)
  * @date     1.2002
  * @version  $Id$
  */
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
 
 #include "xmalloc.h"
 #include "irouts.h"
@@ -316,7 +312,7 @@ static int _count_outs(ir_node *n) {
                }
 
                /* count Def-Use edges for predecessors */
-               if (irn_not_visited(skipped_pred))
+               if (!irn_visited(skipped_pred))
                        res += _count_outs(skipped_pred);
 
                /*count my Def-Use edges */
@@ -340,9 +336,7 @@ static int count_outs(ir_graph *irg) {
           even if they are not visible. */
        for (i = anchor_last - 1; i >= 0; --i) {
                n = get_irg_anchor(irg, i);
-               if (irn_not_visited(n)) {
-                       mark_irn_visited(n);
-
+               if (!irn_visited_else_mark(n)) {
                        n->out = INT_TO_PTR(1);
                        ++res;
                }
@@ -382,7 +376,7 @@ static ir_def_use_edge *_set_out_edges(ir_node *use, ir_def_use_edge *free) {
                ir_node *def = get_irn_n(use, i);
 
                /* Recursion */
-               if (irn_not_visited(def))
+               if (!irn_visited(def))
                        free = _set_out_edges(def, free);
 
                /* Remember this Def-Use edge */
@@ -414,9 +408,7 @@ static ir_def_use_edge *set_out_edges(ir_graph *irg, ir_def_use_edge *free) {
        /* handle anchored nodes */
        for (i = anchor_last - 1; i >= 0; --i) {
                n = get_irg_anchor(irg, i);
-               if (irn_not_visited(n)) {
-                       mark_irn_visited(n);
-
+               if (!irn_visited_else_mark(n)) {
                        n_outs = PTR_TO_INT(n->out);
                        n->out = free;
 #ifdef DEBUG_libfirm
@@ -435,7 +427,7 @@ static ir_def_use_edge *set_out_edges(ir_graph *irg, ir_def_use_edge *free) {
  * position 0, the Start block at position 1.  This is necessary for
  * the out block walker.
  */
-static INLINE void fix_start_proj(ir_graph *irg) {
+static inline void fix_start_proj(ir_graph *irg) {
        ir_node *startbl = get_irg_start_block(irg);
 
        if (get_Block_n_cfg_outs(startbl)) {