Back to index

cell-binutils  2.17cvs20070401
cg_arcs.h
Go to the documentation of this file.
00001 #ifndef cg_arcs_h
00002 #define cg_arcs_h
00003 
00004 /*
00005  * Arc structure for call-graph.
00006  *
00007  * With pointers to the symbols of the parent and the child, a count
00008  * of how many times this arc was traversed, and pointers to the next
00009  * parent of this child and the next child of this parent.
00010  */
00011 typedef struct arc
00012   {
00013     Sym *parent;            /* source vertice of arc */
00014     Sym *child;                    /* dest vertice of arc */
00015     unsigned long count;    /* # of calls from parent to child */
00016     double time;            /* time inherited along arc */
00017     double child_time;             /* child-time inherited along arc */
00018     struct arc *next_parent;       /* next parent of CHILD */
00019     struct arc *next_child; /* next child of PARENT */
00020     int has_been_placed;    /* have this arc's functions been placed? */
00021   }
00022 Arc;
00023 
00024 extern unsigned int num_cycles;    /* number of cycles discovered */
00025 extern Sym *cycle_header;   /* cycle headers */
00026 
00027 extern void arc_add (Sym * parent, Sym * child, unsigned long count);
00028 extern Arc *arc_lookup (Sym * parent, Sym * child);
00029 extern Sym **cg_assemble (void);
00030 extern Arc **arcs;
00031 extern unsigned int numarcs;
00032 
00033 #endif /* cg_arcs_h */