/* ----------------------------------------------------------------------------------- */
-/* Another algorithm to compute recursion nesting depth */
+/* Another algorithm to compute the execution freqency of methods ignoring recursions. */
/* Walk the callgraph. Ignore backedges. Use sum of execution freqencies of Call */
/* nodes to evaluate a callgraph edge. */
/* ----------------------------------------------------------------------------------- */
void set_irg_method_execution_frequency (ir_graph *irg, double freq) {
irg->method_execution_frequency = freq;
+
+ if (irp->max_method_execution_frequency < freq)
+ irp->max_method_execution_frequency = freq;
}
static void compute_method_execution_frequency (ir_graph *irg, void *env) {
DEL_ARR_F(e.loop_stack);
- //dump_callgraph("-with_nesting");
- //dump_callgraph_loop_tree(current_loop, "-after_cons");
-
-
/* -- compute the execution frequency -- */
irp->max_method_execution_frequency = 0;
master_cg_visited += 2;