* dumps the attributes of a node n into the file F.
* Currently this is only the color of a node.
*/
-static void dump_node_vcgattr(FILE *F, ir_node *n, int bad)
+static void dump_node_vcgattr(FILE *F, ir_node *node, ir_node *local, int bad)
{
+ ir_node *n;
+
if (bad) {
fprintf(F, "color: red");
return;
}
if (dump_node_vcgattr_hook)
- if (dump_node_vcgattr_hook(F, n))
+ if (dump_node_vcgattr_hook(F, node, local))
return;
+ n = local ? local : node;
+
switch (get_irn_opcode(n)) {
case iro_Start:
case iro_EndReg:
fprintf(F, " %ld", get_irn_node_nr(con));
fprintf(F, "\" ");
bad |= dump_node_info(F, con);
- dump_node_vcgattr(F, con, bad);
+ dump_node_vcgattr(F, n, con, bad);
fprintf(F, "}\n");
}
}
fprintf(F, " %ld", get_irn_node_nr(blk));
fprintf(F, "\" ");
bad |= dump_node_info(F, blk);
- dump_node_vcgattr(F, blk, bad);
+ dump_node_vcgattr(F, n, blk, bad);
fprintf(F, "}\n");
fprintf (F, "edge: { sourcename: \"");
fprintf(F, "\" ");
bad |= dump_node_info(F, n);
print_node_error(F, p);
- dump_node_vcgattr(F, n, bad);
+ dump_node_vcgattr(F, n, NULL, bad);
fprintf(F, "}\n");
dump_const_node_local(F, n);
#if DO_HEAPANALYSIS
* If this function returns zero, the default attributes are added, else
* removed.
*/
-typedef int (*DUMP_NODE_VCGATTR_FUNC)(FILE *F, ir_node *n);
+typedef int (*DUMP_NODE_VCGATTR_FUNC)(FILE *F, ir_node *node, ir_node *local);
/** Set the node_vcgattr hook. */
void set_dump_node_vcgattr_hook(DUMP_NODE_VCGATTR_FUNC hook);