X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fst%2Fst.c;h=b4ab098a40d5f7feb76dfbf23b0bb4f339ed8768;hb=395c1f470c010aaef09345d08204e8780df6ee0b;hp=7f3e8e6f54376578ea420fcda7773af5e511ef80;hpb=677f67f9b487e35b983148f48b933d54ee383db6;p=libfirm diff --git a/ir/st/st.c b/ir/st/st.c index 7f3e8e6f5..b4ab098a4 100644 --- a/ir/st/st.c +++ b/ir/st/st.c @@ -1,40 +1,44 @@ -/* Copyright (c) 2002 by Universität Karlsruhe (TH). All Rights Reserved */ /* -** Time-stamp: -*/ - -/*** + * Project: libFIRM + * File name: ir/st/st.c + * Purpose: Provide some auxilliary structures for firm graphs. + * Author: Florian Liekweg + * Modified by: + * Created: 26.2.2002 + * CVS-ID: $Id$ + * Copyright: (c) 2002-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ + +/** NAME st.h PURPOSE provide some auxilliary structures for firm graphs. - NOTES + S not quite complete - HISTORY - liekweg - Feb 26, 2002: Created. - CVS: - $Id$ ***/ -# include "st.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif -# include "irgwalk.h" +# include +# include -# include -# ifdef DEBUG_libfirm -# endif /* def DEBUG_libfirm */ -# include -# include "misc.h" +# include "st.h" +# include "irgwalk.h" +# include "xmalloc.h" /* init globals: */ -static dtree_t *trees = 0; +/*static*/ dtree_t *trees = 0; /* static dtree_t *last = 0; */ /* -------------------------------------------------------------------- -** Helper Functions -** -------------------------------------------------------------------- */ +* Helper Functions +* -------------------------------------------------------------------- */ /* Helper function for get_n_blocks */ @@ -48,7 +52,7 @@ static void count_block (ir_node *block, void *env) # endif /* def DEBUG_libfirm */ fprintf (stdout, "%s: Block(%p) has # (%i)\n", - __FILE__ ":" __PRETTY_FUNCTION__, block, *n); + __FILE__ ":count_block", (void *)block, *n); (*n) ++; } @@ -70,7 +74,7 @@ static int get_n_blocks (ir_graph *graph) irg_block_walk (end_block, count_block, NULL, &n); fprintf (stdout, "%s: Graph(%p) has (%i) blocks\n", - __FILE__ ":" __PRETTY_FUNCTION__, graph, n); + __FILE__ ":get_n_blocks", (void *)graph, n); return (n); } @@ -127,8 +131,8 @@ static void free_dt (dt_t *dt) */ /* -------------------------------------------------------------------- -** Private Functions -** -------------------------------------------------------------------- */ +* Private Functions +* -------------------------------------------------------------------- */ /* Given a graph, find its dominator tree in the global list: @@ -315,7 +319,7 @@ static void update_dominators (ir_node *block, void *env) /* check preds: */ for (i = 0; i < n_ins; i ++) { - ir_node *in = get_nodes_Block (get_irn_n (block, i)); + ir_node *in = get_nodes_block (get_irn_n (block, i)); bs_t in_mask = get_mask (dt, in); new_mask &= in_mask; @@ -374,7 +378,7 @@ static ir_node *_get_idom (dt_t *dt, ir_node *block) { ir_node *ndom = 0; - pred = get_nodes_Block (get_irn_n (block, i)); + pred = get_nodes_block (get_irn_n (block, i)); ndom = _get_idom (dt, pred); if (ndom != idom) @@ -398,8 +402,8 @@ static ir_node *_get_idom (dt_t *dt, ir_node *block) } /* -------------------------------------------------------------------- -** Public Functions -** -------------------------------------------------------------------- */ +* Public Functions +* -------------------------------------------------------------------- */ /* Say wether a dominates b