libFirm
callgraph.h File Reference

Representation and computation of the callgraph. More...

#include "firm_types.h"
#include "begin.h"
#include "end.h"

Go to the source code of this file.

Typedefs

typedef void callgraph_walk_func (ir_graph *g, void *env)
 A function type for functions passed to the callgraph walker.

Enumerations

enum  irp_callgraph_state { irp_callgraph_none, irp_callgraph_consistent, irp_callgraph_inconsistent, irp_callgraph_and_calltree_consistent }
 Flag to indicate state of callgraph. More...
enum  loop_nesting_depth_state { loop_nesting_depth_none, loop_nesting_depth_consistent, loop_nesting_depth_inconsistent }
 The state of loop nesting depth. More...

Functions

irp_callgraph_state get_irp_callgraph_state (void)
 Returns the callgraph state of the program representation.
void set_irp_callgraph_state (irp_callgraph_state s)
 Sets the callgraph state of the program representation.
size_t get_irg_n_callers (const ir_graph *irg)
 Returns the number of procedures that call the given irg.
ir_graphget_irg_caller (const ir_graph *irg, size_t pos)
 Returns the caller at position pos.
int is_irg_caller_backedge (const ir_graph *irg, size_t pos)
 Returns non-zero if the caller at position pos is "a backedge", i.e.
int has_irg_caller_backedge (const ir_graph *irg)
 Returns non-zero if the irg has a backedge caller.
size_t get_irg_caller_loop_depth (const ir_graph *irg, size_t pos)
 Returns the maximal loop depth of call nodes that call along this edge.
size_t get_irg_n_callees (const ir_graph *irg)
 Returns the number of procedures that are called by the given irg.
ir_graphget_irg_callee (const ir_graph *irg, size_t pos)
 Returns the callee at position pos.
int is_irg_callee_backedge (const ir_graph *irg, size_t pos)
 Returns non-zero if the callee at position pos is "a backedge", i.e.
int has_irg_callee_backedge (const ir_graph *irg)
 Returns non-zero if the irg has a backedge callee.
size_t get_irg_callee_loop_depth (const ir_graph *irg, size_t pos)
 Returns the maximal loop depth of call nodes that call along this edge.
size_t get_irg_loop_depth (const ir_graph *irg)
 Returns the maximal loop depth of all paths from an external visible method to this irg.
size_t get_irg_recursion_depth (const ir_graph *irg)
 Returns the maximal recursion depth of all paths from an external visible method to this irg.
double get_irg_method_execution_frequency (const ir_graph *irg)
 Returns the method execution frequency of a graph.
void compute_callgraph (void)
 Construct the callgraph.
void free_callgraph (void)
 Destruct the callgraph.
void callgraph_walk (callgraph_walk_func *pre, callgraph_walk_func *post, void *env)
 Walks over the callgraph.
void find_callgraph_recursions (void)
 Compute the backedges that represent recursions and a looptree.
void analyse_loop_nesting_depth (void)
 Computes the interprocedural loop nesting information.
loop_nesting_depth_state get_irp_loop_nesting_depth_state (void)
 Returns the nesting depth state of the program representation.
void set_irp_loop_nesting_depth_state (loop_nesting_depth_state s)
 Sets the nesting depth state of the program representation.
void set_irp_loop_nesting_depth_state_inconsistent (void)
 Marks the nesting depth state of the program representation as inconsistent.

Detailed Description

Representation and computation of the callgraph.

Author
Goetz Lindenmaier
Date
21.7.2004 callgraph analysis

Definition in file callgraph.h.