X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=include%2Flibfirm%2Fcallgraph.h;h=d419c2af4aa5c7f311970f3d893e263e731e9570;hb=2627a1884cc59bacf6b778cc6e9c3d0b992575a7;hp=5a9cdc77bc316e03f4c41983e003de5aa4f973c7;hpb=599f2d24cc98e5389a0711cd0a91aba172b8637a;p=libfirm diff --git a/include/libfirm/callgraph.h b/include/libfirm/callgraph.h index 5a9cdc77b..d419c2af4 100644 --- a/include/libfirm/callgraph.h +++ b/include/libfirm/callgraph.h @@ -57,45 +57,45 @@ irp_callgraph_state get_irp_callgraph_state(void); void set_irp_callgraph_state(irp_callgraph_state s); /** Returns the number of procedures that call the given irg. */ -int get_irg_n_callers(ir_graph *irg); +int get_irg_n_callers(const ir_graph *irg); /** Returns the caller at position pos. */ -ir_graph *get_irg_caller(ir_graph *irg, int pos); +ir_graph *get_irg_caller(const ir_graph *irg, int pos); /** 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); +int is_irg_caller_backedge(const ir_graph *irg, int pos); /** Returns non-zero if the irg has a backedge caller. */ -int has_irg_caller_backedge(ir_graph *irg); +int has_irg_caller_backedge(const ir_graph *irg); /** Returns the maximal loop depth of call nodes that call along this edge. */ -int get_irg_caller_loop_depth(ir_graph *irg, int pos); +int get_irg_caller_loop_depth(const ir_graph *irg, int pos); /** Returns the number of procedures that are called by the given irg. */ -int get_irg_n_callees(ir_graph *irg); +int get_irg_n_callees(const ir_graph *irg); /** Returns the callee at position pos. */ -ir_graph *get_irg_callee(ir_graph *irg, int pos); +ir_graph *get_irg_callee(const ir_graph *irg, int pos); /** Returns non-zero if the callee at position pos is "a backedge", i.e. a recursion. */ -int is_irg_callee_backedge(ir_graph *irg, int pos); +int is_irg_callee_backedge(const ir_graph *irg, int pos); /** Returns non-zero if the irg has a backedge callee. */ -int has_irg_callee_backedge(ir_graph *irg); +int has_irg_callee_backedge(const ir_graph *irg); /** Returns the maximal loop depth of call nodes that call along this edge. */ -int get_irg_callee_loop_depth(ir_graph *irg, int pos); +int get_irg_callee_loop_depth(const ir_graph *irg, int pos); /** Returns the maximal loop depth of all paths from an external visible method to this irg. */ -int get_irg_loop_depth(ir_graph *irg); +int get_irg_loop_depth(const ir_graph *irg); /** Returns the maximal recursion depth of all paths from an external visible method to this irg. */ -int get_irg_recursion_depth(ir_graph *irg); +int get_irg_recursion_depth(const ir_graph *irg); /** Returns the method execution frequency of a graph. */ -double get_irg_method_execution_frequency(ir_graph *irg); +double get_irg_method_execution_frequency(const ir_graph *irg); /** * Construct the callgraph. Expects callee information, i.e., @@ -126,8 +126,8 @@ typedef void callgraph_walk_func(ir_graph *g, void *env); * @param post - walker function, executed after the predecessor of a node are visited * @param env - environment, passed to pre and post */ -void callgraph_walk(ir_entity **roots, unsigned n_roots, - callgraph_walk_func *pre, callgraph_walk_func *post, void *env); +void callgraph_walk(callgraph_walk_func *pre, callgraph_walk_func *post, + void *env); /** * Compute the backedges that represent recursions and a looptree.