# include "config.h"
#endif
+#ifdef INTERPROCEDURAL_VIEW
+
#ifdef HAVE_STRING_H
# include <string.h>
#endif
return NULL;
}
+#ifdef INTERPROCEDURAL_VIEW
/* Returns non-zero if the caller at position pos is "a backedge", i.e. a recursion. */
int is_irg_caller_backedge(ir_graph *irg, int pos) {
assert (pos >= 0 && pos < get_irg_n_callers(irg));
}
return 0;
}
+#endif
/**
* Find the reversion position of a caller.
return 0;
}
+#ifdef INTERPROCEDURAL_VIEW
/**
* Mark the callee at position pos as a backedge.
*/
irg->callee_isbe = xcalloc(n, sizeof(irg->callee_isbe[0]));
irg->callee_isbe[pos] = 1;
}
+#endif
/* Returns the maximal loop depth of call nodes that call along this edge. */
int get_irg_callee_loop_depth(ir_graph *irg, int pos) {
static void ana_Call(ir_node *n, void *env) {
int i, n_callees;
ir_graph *irg;
+ (void) env;
if (! is_Call(n)) return;
static int loop_node_cnt = 0; /**< Counts the number of allocated cfloop nodes.
Each cfloop node gets a unique number.
What for? ev. remove. @@@ */
+#ifdef INTERPROCEDURAL_VIEW
static int current_dfn = 1; /**< Counter to generate depth first numbering
of visited nodes. */
+#endif
/*-----------------*/
} while(m != irg);
}
+#ifdef INTERPROCEDURAL_VIEW
/* GL ??? my last son is my grandson??? Removes cfloops with no
ir_nodes in them. Such loops have only another loop as son. (Why
can't they have two loops as sons? Does it never get that far? ) */
current_loop = l;
}
+#endif
/**
* Removes and unmarks all nodes up to n from the stack.
/* The loop data structure. **/
/**********************************************************************/
+#ifdef INTERPROCEDURAL_VIEW
/**
* Allocates a new loop as son of current_loop. Sets current_loop
* to the new loop and returns the father.
son->children = NEW_ARR_F (loop_element, 0);
son->n_nodes = 0;
son->n_sons = 0;
+ son->link = NULL;
if (father) {
son->outer_loop = father;
add_loop_son(father, son);
#ifdef DEBUG_libfirm
son->loop_nr = get_irp_new_node_nr();
- son->link = NULL;
#endif
current_loop = son;
return !some_outof_loop & some_in_loop;
}
-
/**
* Check whether there is a parallel edge in the ip control flow.
* Only
}
#endif
-
/*-----------------------------------------------------------*
* The core algorithm. *
*-----------------------------------------------------------*/
irg->callee_isbe = NULL;
}
}
+#endif
/* nodes to evaluate a callgraph edge. */
/* ----------------------------------------------------------------------------------- */
+#ifdef INTERPROCEDURAL_VIEW
/* Returns the method execution frequency of a graph. */
double get_irg_method_execution_frequency (ir_graph *irg) {
return irg->method_execution_frequency;
double freq;
int found_edge;
int n_callees;
+ (void) env;
if (cg_irg_visited(irg)) return;
}
}
}
+#endif
/* Returns the maximal loop depth of all paths from an external visible method to
this irg. */
if (irp->lnd_state == loop_nesting_depth_consistent)
irp->lnd_state = loop_nesting_depth_inconsistent;
}
+
+#endif