X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fana%2Fdfs_t.h;h=2e14fb8849d563cac3a69c2d173258d63a4d1079;hb=ceefa5a3e6ff610b4b7d92033b8c2443cbc07938;hp=e809ba154df10cf7d2955c3f4fe50ad6ce96a1e9;hpb=aa4d0c76a2e006e9ba4d89f38701b07b8ec74991;p=libfirm diff --git a/ir/ana/dfs_t.h b/ir/ana/dfs_t.h index e809ba154..2e14fb884 100644 --- a/ir/ana/dfs_t.h +++ b/ir/ana/dfs_t.h @@ -22,7 +22,7 @@ * @author Sebastian Hack * @date 21.04.2007 * @version $Id$ - * @summary + * @brief * * depth first search internal stuff. */ @@ -34,7 +34,7 @@ #include "obst.h" #include "dfs.h" -struct _dfs_node_t { +struct dfs_node_t { int visited; const void *node; const void *ancestor; @@ -44,13 +44,13 @@ struct _dfs_node_t { int level; }; -struct _dfs_edge_t { +struct dfs_edge_t { const void *src, *tgt; dfs_node_t *s, *t; dfs_edge_kind_t kind; }; -struct _dfs_t { +struct dfs_t { void *graph; const absgraph_t *graph_impl; struct obstack obst; @@ -66,20 +66,20 @@ struct _dfs_t { unsigned edges_classified : 1; }; -static struct _dfs_node_t *_dfs_get_node(const struct _dfs_t *self, const void *node) +static dfs_node_t *_dfs_get_node(const dfs_t *self, const void *node) { - struct _dfs_node_t templ; + dfs_node_t templ; memset(&templ, 0, sizeof(templ)); templ.node = node; - return set_insert(self->nodes, &templ, sizeof(templ), HASH_PTR(node)); + return (dfs_node_t*) set_insert(self->nodes, &templ, sizeof(templ), HASH_PTR(node)); } #define _dfs_int_is_ancestor(n, m) ((m)->pre_num >= (n)->pre_num && (m)->pre_num <= (n)->max_pre_num) -static INLINE int _dfs_is_ancestor(const struct _dfs_t *dfs, const void *a, const void *b) +static inline int _dfs_is_ancestor(const dfs_t *dfs, const void *a, const void *b) { - struct _dfs_node_t *n = _dfs_get_node(dfs, a); - struct _dfs_node_t *m = _dfs_get_node(dfs, b); + dfs_node_t *n = _dfs_get_node(dfs, a); + dfs_node_t *m = _dfs_get_node(dfs, b); return _dfs_int_is_ancestor(n, m); }