/* Copyright (c) 2002 by Universität Karlsruhe (TH). All Rights Reserved */
/*
-** Time-stamp: <Friday, 05.07.2002, 11:06:38 goetz@i44pc2.info.uni-karlsruhe.de>
+* Time-stamp: <Thursday, 31.10.2002, 16:03:00 goetz@i44pc2.info.uni-karlsruhe.de>
*/
-/***
+/**
NAME
st.h
PURPOSE
provide some auxilliary structures for firm graphs.
- NOTES
+ S
not quite complete
HISTORY
liekweg - Feb 26, 2002: Created.
$Id$
***/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
# include "st.h"
# include "irgwalk.h"
# include <stdio.h>
# ifdef DEBUG_libfirm
# endif /* def DEBUG_libfirm */
-# include <malloc.h>
+# include <stdlib.h>
# include "misc.h"
/* init globals: */
*/
/* --------------------------------------------------------------------
-** Helper Functions
-** -------------------------------------------------------------------- */
+* Helper Functions
+* -------------------------------------------------------------------- */
/*
Helper function for get_n_blocks
*/
# endif /* def DEBUG_libfirm */
fprintf (stdout, "%s: Block(%p) has # (%i)\n",
- __FILE__ ":" __PRETTY_FUNCTION__, block, *n);
+ __FILE__ ":count_block", block, *n);
(*n) ++;
}
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", graph, n);
return (n);
}
*/
/* --------------------------------------------------------------------
-** Private Functions
-** -------------------------------------------------------------------- */
+* Private Functions
+* -------------------------------------------------------------------- */
/*
Given a graph, find its dominator tree in the global list:
if (new_mask != old_mask)
{
- w->changed = TRUE;
+ w->changed = true;
_set_mask (dt, block_index, new_mask);
# ifdef VERBOSE_libfirm
}
/* --------------------------------------------------------------------
-** Public Functions
-** -------------------------------------------------------------------- */
+* Public Functions
+* -------------------------------------------------------------------- */
/*
Say wether a dominates b
w->dt = dt;
w->start_block = start_block;
- w->changed = TRUE; /* at least one walk */
+ w->changed = true; /* at least one walk */
/* do the walk: */
{
while (w->changed)
{
- w->changed = FALSE;
+ w->changed = false;
irg_block_walk (end_block, update_dominators, update_dominators, (void*) w);
walks ++;
}