From 1cd7ef766ab484f27da76390b145447fb95c9852 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=B6tz=20Lindenmaier?= Date: Mon, 12 Mar 2001 16:02:47 +0000 Subject: [PATCH] irdump: Funcion to turn off labels for cvs edges [r126] --- ir/ir/irdump.c | 30 ++++++++++++++++++++++++++---- ir/ir/irdump.h | 5 +++++ 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/ir/ir/irdump.c b/ir/ir/irdump.c index 45f4d0359..b1200da43 100644 --- a/ir/ir/irdump.c +++ b/ir/ir/irdump.c @@ -54,6 +54,7 @@ /* file to dump to */ static FILE *F; +int edge_label = 1; /*******************************************************************/ /* routines to dump information about a single node */ @@ -574,6 +575,7 @@ void vcg_open (ir_graph *irg, char *suffix) { const char *cp; ident *id; int len; + char label[4]; /** open file for vcg graph */ id = get_entity_ld_name (get_irg_ent(irg)); @@ -598,16 +600,22 @@ void vcg_open (ir_graph *irg, char *suffix) { 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 */ } @@ -615,6 +623,7 @@ void vcg_open (ir_graph *irg, char *suffix) { 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); @@ -626,16 +635,22 @@ void vcg_open_name (const char *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 */ } @@ -840,3 +855,10 @@ void dump_all_ir_graphs (void dump_graph(ir_graph*)) { 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; +} diff --git a/ir/ir/irdump.h b/ir/ir/irdump.h index f0dcb3b2c..15c740609 100644 --- a/ir/ir/irdump.h +++ b/ir/ir/irdump.h @@ -45,4 +45,9 @@ void dump_ir_graph_w_types (ir_graph *irg); * dump_ir_graph_w_types */ void dump_all_ir_graphs (void dump_graph(ir_graph*)); +/* To turn off display of edge labels. Edge labels offen cause xvcg to + abort with a segmentation fault. */ +void turn_of_edge_labels(); + + # endif /* _IRDUMP_H_ */ -- 2.20.1