* Modified by: Goetz Lindenmaier, Hubert Schmidt
* Created:
* CVS-ID: $Id$
- * Copyright: (c) 1998-2003 Universität Karlsruhe
+ * Copyright: (c) 1998-2003 Universit�t Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
#ifdef HAVE_CONFIG_H
static const char *overrule_nodecolor = NULL;
+/** An additional edge hook. */
+static DUMP_NODE_EDGE_FUNC dump_node_edge_hook = NULL;
+
+void set_dump_node_edge_hook(DUMP_NODE_EDGE_FUNC func)
+{
+ dump_node_edge_hook = func;
+}
+
+DUMP_NODE_EDGE_FUNC get_dump_node_edge_hook(void)
+{
+ return dump_node_edge_hook;
+}
+
+
/** The vcg attribute hook. */
static DUMP_NODE_VCGATTR_FUNC dump_node_vcgattr_hook = NULL;
dump_node_vcgattr(F, n, NULL, bad);
fprintf(F, "}\n");
dump_const_node_local(F, n);
+
+ if(dump_node_edge_hook)
+ dump_node_edge_hook(F, n);
#if DO_HEAPANALYSIS
dump_irn_chi_term(F, n);
dump_irn_state(F, n);
/** Set the node_vcgattr hook. */
void set_dump_node_vcgattr_hook(DUMP_NODE_VCGATTR_FUNC hook);
+typedef int (*DUMP_NODE_EDGE_FUNC)(FILE *f, ir_node *node);
+
+/**
+ * Set the hook to be called to dump additional edges to a node.
+ * @param func The hook to be called.
+ */
+void set_dump_node_edge_hook(DUMP_NODE_EDGE_FUNC func);
+
+/**
+ * Get the additional edge dump hook.
+ * @return The current additional edge dump hook.]
+ */
+DUMP_NODE_EDGE_FUNC get_dump_node_edge_hook(void);
+
/** Dump a firm graph.
*
* @param irg The firm graph to be dumped.
* Author: Sebastian Hack
* Created: 15.01.2005
* CVS-ID: $Id$
- * Copyright: (c) 1998-2005 Universität Karlsruhe
+ * Copyright: (c) 1998-2005 Universit�t Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
return _get_irg_edge_info(irg)->activated;
}
+/**
+ * Assure, that the edges information is present for a certain graph.
+ * @param irg The graph.
+ */
+static INLINE void _edges_assure(ir_graph *irg)
+{
+ if(!_edges_activated(irg))
+ edges_activate(irg);
+}
+
void edges_reroute(ir_node *old, ir_node *nw, ir_graph *irg);
void edges_init_graph(ir_graph *irg);
#define get_edge_src_irn(edge) _get_edge_src_irn(edge)
#define get_edge_src_pos(edge) _get_edge_src_pos(edge)
#define edges_activated(irg) _edges_activated(irg)
+#define edges_assure(irg) _edges_assure(irg)
#else
/* new edges are disabled */
#define get_edge_src_irn(edge) NULL
#define get_edge_src_pos(edge) -1
#define edges_activated(irg) 0
+#define edges_assure(irg)
#endif /* FIRM_EDGES_INPLACE */