X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fana%2Fcallgraph.h;h=514d74910bf8acf6cd2beeec4d3e1721e0646ea5;hb=ff0e8d7fcb34481652f0bf521ba04b1eca5e2106;hp=78df92333fde1a78afdc0814d5f76c54627773db;hpb=3631cbbff48a2c1622d829ac1c1199bdaf18a669;p=libfirm diff --git a/ir/ana/callgraph.h b/ir/ana/callgraph.h index 78df92333..514d74910 100644 --- a/ir/ana/callgraph.h +++ b/ir/ana/callgraph.h @@ -66,6 +66,7 @@ int get_irg_callee_loop_depth(ir_graph *irg, int pos); /** Maximal loop depth of all paths from an external visible method to this irg. */ int get_irg_loop_depth(ir_graph *irg); + /** Maximal recursion depth of all paths from an external visible method to this irg. */ int get_irg_recursion_depth(ir_graph *irg); @@ -99,17 +100,33 @@ void find_callgraph_recursions(void); * path from main(). * - The recursion depth. The maximal number of recursions passed * on all paths reaching this method. - * - The execution freqency. As loop depth, but the edge weight is the sum - * of the execution freqencies of all Calls along the edge. + * - The execution frequency. As loop depth, but the edge weight is the sum + * of the execution frequencies of all Calls along the edge. **/ void compute_performance_estimates(void); -/** Computes the loop nesting information. +/** Computes the interprocedural loop nesting information. + * + * Computes two numbers for each irg: the depth it is called in 'normal' + * loops and the depth of recursions it is in. * * Computes callee info and the callgraph if * this information is not available. */ void analyse_loop_nesting_depth(void); +/** State of loop nesting depth. */ +typedef enum { + loop_nesting_depth_none, /**< Loop nesting depths are not computed, no memory is + allocated, access fails. */ + loop_nesting_depth_consistent, /**< Loop nesting depth information is computed and correct. */ + loop_nesting_depth_inconsistent /**< Loop nesting depth is computed but the graphs have been + changed since. */ +} loop_nesting_depth_state; + +loop_nesting_depth_state get_irp_loop_nesting_depth_state(void); +void set_irp_loop_nesting_depth_state(loop_nesting_depth_state s); +void set_irp_loop_nesting_depth_state_inconsistent(void); + #endif /* _CALLGRAPH_H_ */