88 int inode, num_at_level, iedge, to_node, num_edges, num_sinks, num_levels,
95 int *tnode_fanin_left;
99 free_list_head = NULL;
100 nodes_at_level_head = NULL;
114 for (inode = 0; inode <
num_tnodes; inode++) {
115 if (tnode_fanin_left[inode] == 0) {
127 while (num_at_level != 0) {
136 for (iedge = 0; iedge < num_edges; iedge++) {
137 to_node = tedge[iedge].
to_node;
138 tnode_fanin_left[to_node]--;
140 if (tnode_fanin_left[to_node] == 0) {
143 nodes_at_level_head, to_node, &free_list_head);
153 num_levels *
sizeof(
struct s_ivec));
156 free(tnode_fanin_left);
struct s_ivec * tnodes_at_level
static int * alloc_and_load_tnode_fanin_and_check_edges(int *num_sinks_ptr)
t_linked_int * insert_in_int_list(t_linked_int *head, int data, t_linked_int **free_list_head_ptr)
void alloc_ivector_and_copy_int_list(t_linked_int **list_head_ptr, int num_items, struct s_ivec *ivec, t_linked_int **free_list_head_ptr)
static void * my_malloc(int ibytes)
void free_int_list(t_linked_int **int_list_head_ptr)
static void * my_realloc(void *memblk, int ibytes)