/* -*- c -*- */
/*
- * Project: libFIRM
- * File name: ir/ana/ecg.c
- * Purpose: Extended Call Graph
- * Author: Florian
- * Modified by:
- * Created: 14.09.2004
- * CVS-ID: $Id$
- * Copyright: (c) 1999-2004 Universität Karlsruhe
- * Licence: This file is protected by the GPL - GNU GENERAL PUBLIC LICENSE.
+ * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
+ *
+ * This file is part of libFirm.
+ *
+ * This file may be distributed and/or modified under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation and appearing in the file LICENSE.GPL included in the
+ * packaging of this file.
+ *
+ * Licensees holding valid libFirm Professional Edition licenses may use
+ * this file in accordance with the libFirm Commercial License.
+ * Agreement provided with the Software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
*/
+/**
+ * @file
+ * @brief Extended Call Graph
+ * @author Florian
+ * @date 14.09.2004
+ * @version $Id$
+ */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
static int _max_depth = 0;
static int _max_callEds = 0;
-static entity* _max_callEds_callR = NULL;
+static ir_entity* _max_callEds_callR = NULL;
/* Protos */
void set_main_ctx (ctx_info_t*);
Given a method, find the firm graph that implements that method.
Return NULL for abstract and native methods.
*/
-static ir_graph *_get_implementing_graph (entity *method)
+static ir_graph *_get_implementing_graph (ir_entity *method)
{
ir_graph *graph = NULL;
assert (!graph);
for (i = 0; (NULL == graph) && (i < n_over); i ++) {
- entity *over = get_entity_overwrites (method, i);
+ ir_entity *over = get_entity_overwrites (method, i);
graph = _get_implementing_graph (over);
}
/**
Collect all graphs of 'method' in the given set.
*/
-static void _collect_implementing_graphs (entity *method, lset_t *set)
+static void _collect_implementing_graphs (ir_entity *method, lset_t *set)
{
/* search DOWN-wards in clazz hierarchy */
int i;
}
for (i = 0; i < n_over; i ++) {
- entity *over = get_entity_overwrittenby (method, i);
+ ir_entity *over = get_entity_overwrittenby (method, i);
_collect_implementing_graphs (over, set);
}
/**
Collect all graphs that could possibly be executed when 'method' is called.
*/
-static lset_t *get_implementing_graphs (entity *method, ir_node *select)
+static lset_t *get_implementing_graphs (ir_entity *method, ir_node *select)
{
/* const char *name = get_entity_name (method); */
/* fprintf (stdout, "%s (ent %s)\n", __FUNCTION__, name); */
graph_info_t *graph_info = (graph_info_t*) env;
if (op_Call == op) { /* CALL */
- entity *ent = NULL;
+ ir_entity *ent = NULL;
ir_node *ptr = get_Call_ptr (node);
if (!call_is_call (node, ptr)) {
*/
void ecg_print_ctx (ctx_info_t *ctx, FILE *stream)
{
- entity *ent = get_irg_entity(ctx->graph);
+ ir_entity *ent = get_irg_entity(ctx->graph);
ir_node *call = ctx->call;
const char *ent_name = get_entity_name (ent);
const char *own_name = get_type_name (get_entity_owner (ent));
fprintf (dot, "\", color=\"green3\"];\n");
fprintf (dot,
- "\tgraph_0x%08x -> ctx_0x%08x:HEAD [label=\"ctx\", dir=\"none\", style=\"dotted\"];\n",
- (int) graph, (int) graph);
+ "\tgraph_0x%p -> ctx_0x%p:HEAD [label=\"ctx\", dir=\"none\", style=\"dotted\"];\n",
+ graph, graph);
}
} else {
fprintf (dot, "\t/* graph is not called */\n");
\f
/*
- $Log$
+ $Log: ecg.c,v $
+ Revision 1.23 2006/12/13 19:46:47 beck
+ rename type entity into ir_entity
+
Revision 1.22 2006/01/13 22:55:03 beck
renamed all types 'type' to 'ir_type'