# include "typalise.h"
# include "lset.h"
+# define HERE(msg) fprintf (stdout, "%s:%i %s\n", __FUNCTION__, __LINE__, msg)
+
/*
le flag
*/
*/
static void ecg_fill_graph_calls (ir_graph *graph)
{
- graph_info_t *graph_info = (graph_info_t*) xmalloc (sizeof (graph_info_t));
+ graph_info_t *ginfo = (graph_info_t*) xmalloc (sizeof (graph_info_t));
+
+ /* memset (ginfo, 0x00, sizeof (graph_info_t)); */
+ assert (ginfo != graph_infos_list);
- graph_info->graph = graph;
- graph_info->calls = NULL;
- graph_info->ecg_seen = 0;
- graph_info->ctxs = NULL;
- graph_info->n_ctxs = 0;
+ ginfo->graph = graph;
+ ginfo->calls = NULL;
+ ginfo->ecg_seen = 0;
+ ginfo->ctxs = NULL;
+ ginfo->n_ctxs = 0;
+ ginfo->prev = NULL;
/* link up into global list */
- graph_info->prev = graph_infos_list;
- graph_infos_list = graph_info;
+ ginfo->prev = graph_infos_list;
+ graph_infos_list = ginfo;
+
+ assert (ginfo != ginfo->prev);
- irg_walk_graph (graph, ecg_calls_act, NULL, graph_info);
+ irg_walk_graph (graph, ecg_calls_act, NULL, ginfo);
- pmap_insert (graph_infos, graph, graph_info);
+ pmap_insert (graph_infos, graph, ginfo);
}
/**
/* allocate the memory needed for the ctxts: */
graph_info_t *ginfo = graph_infos_list;
+ HERE ("start");
while (NULL != ginfo) {
ginfo->ctxs = (ctx_info_t **) xmalloc (ginfo->n_ctxs * sizeof (ctx_info_t*));
*/
ginfo->n_ctxs = 0;
+ assert (ginfo != ginfo->prev);
ginfo = ginfo->prev;
}
+ HERE ("end");
}
/**
static void ecg_fill_ctxs (void)
{
ecg_fill_ctxs_count (get_irp_main_irg ());
+ HERE ("start");
ecg_fill_ctxs_alloc ();
+ HERE ("start");
ctx_info_t *main_ctx = new_ctx (get_irp_main_irg (), NULL, NULL);
ir_graph *main_irg = get_irp_main_irg ();
graph_infos = pmap_create ();
ecg_fill_calls ();
+ HERE ("start");
ecg_fill_ctxs ();
-
ecg_ecg ();
}
*/
void ecg_cleanup ()
{
+ return;
+
int i;
for (i = 0; i < get_irp_n_irgs (); i++) {
/*
$Log$
+ Revision 1.7 2004/11/26 16:01:56 liekweg
+ debugging annotations
+
Revision 1.6 2004/11/24 14:53:55 liekweg
Bugfixes