* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#include <stdio.h>
#include "libiberty.h"
#include "gprof.h"
+#include "search_list.h"
+#include "source.h"
+#include "symtab.h"
#include "cg_arcs.h"
#include "cg_dfn.h"
-#include "symtab.h"
#include "utils.h"
#define DFN_INCR_DEPTH (128)
}
DFN_Stack;
+static boolean is_numbered PARAMS ((Sym *));
+static boolean is_busy PARAMS ((Sym *));
+static void find_cycle PARAMS ((Sym *));
+static void pre_visit PARAMS ((Sym *));
+static void post_visit PARAMS ((Sym *));
+
DFN_Stack *dfn_stack = NULL;
int dfn_maxdepth = 0;
int dfn_depth = 0;
/*
* Is CHILD already numbered?
*/
-static bool
-DEFUN (is_numbered, (child), Sym * child)
+static boolean
+is_numbered (child)
+ Sym *child;
{
return child->cg.top_order != DFN_NAN && child->cg.top_order != DFN_BUSY;
}
/*
* Is CHILD already busy?
*/
-static bool
-DEFUN (is_busy, (child), Sym * child)
+static boolean
+is_busy (child)
+ Sym *child;
{
if (child->cg.top_order == DFN_NAN)
{
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
* depth-first number).
*/
static void
-DEFUN (find_cycle, (child), Sym * child)
+find_cycle (child)
+ Sym *child;
{
Sym *head = 0;
Sym *tail;
* the stack and mark it busy.
*/
static void
-DEFUN (pre_visit, (parent), Sym * parent)
+pre_visit (parent)
+ Sym *parent;
{
++dfn_depth;
* and number functions if PARENT is head of a cycle.
*/
static void
-DEFUN (post_visit, (parent), Sym * parent)
+post_visit (parent)
+ Sym *parent;
{
Sym *member;
* Given this PARENT, depth first number its children.
*/
void
-DEFUN (cg_dfn, (parent), Sym * parent)
+cg_dfn (parent)
+ Sym *parent;
{
Arc *arc;