/* file to dump to */
static FILE *F;
+int edge_label = 1;
/*******************************************************************/
/* routines to dump information about a single node */
const char *cp;
ident *id;
int len;
+ char label[4];
/** open file for vcg graph */
id = get_entity_ld_name (get_irg_ent(irg));
panic ("cannot open %s for writing (%m)", fname); /* not reached */
}
+ if (edge_label) {
+ strcpy(label, "yes");
+ } else {
+ strcpy (label, "no");
+ }
+
/* print header */
xfprintf (F,
"graph: { title: \"ir graph of %s\"\n"
- "display_edge_labels: yes\n"
+ "display_edge_labels: %s\n"
"layoutalgorithm: mindepth\n"
"manhattan_edges: yes\n"
"port_sharing: no\n"
"orientation: bottom_to_top\n"
"classname 1: \"Data\"\n"
- "classname 2: \"Block\"\n", cp);
+ "classname 2: \"Block\"\n", cp, label);
xfprintf (F, "\n"); /* a separator */
}
void vcg_open_name (const char *name) {
char *fname; /* filename to put the vcg information in */
int len;
+ char label[4];
/** open file for vcg graph */
len = strlen(name);
panic ("cannot open %s for writing (%m)", fname); /* not reached */
}
+ if (edge_label) {
+ strcpy(label, "yes");
+ } else {
+ strcpy (label, "no");
+ }
+
/* print header */
xfprintf (F,
"graph: { title: \"ir graph of %s\"\n"
- "display_edge_labels: yes\n"
+ "display_edge_labels: %s\n"
"layoutalgorithm: mindepth\n"
"manhattan_edges: yes\n"
"port_sharing: no\n"
"orientation: bottom_to_top\n"
"classname 1: \"Data\"\n"
- "classname 2: \"Block\"\n", name);
+ "classname 2: \"Block\"\n", name, label);
xfprintf (F, "\n"); /* a separator */
}
dump_graph(get_irp_irg(i));
}
}
+
+
+/* To turn off display of edge labels. Edge labels offen cause xvcg to
+ abort with a segmentation fault. */
+void turn_of_edge_labels() {
+ edge_label = 0;
+}