Commit f1b9fb1a authored by Till Riedel's avatar Till Riedel
Browse files

Last commit did not dump node2type edges correctly

[r819]
parent 49f34bc0
......@@ -65,7 +65,7 @@
#define ARR_ELT_TYPE_EDGE_ATTR "class: 10 label: \"arr elt tp\" color:green"
#define ARR_ENT_EDGE_ATTR "class: 10 label: \"arr ent\" color: green"
#define ENT_OVERWRITES_EDGE_ATTR "class: 11 label: \"overwrites\" color:red"
#define ENT_VALUE_EDGE_ATTR "label: \"value "
#define ENT_VALUE_EDGE_ATTR "label: \"value %d\""
#define ENT_CORR_EDGE_ATTR "label: \"value %d corresponds to \" "
#define TYPE_MEMBER_EDGE_ATTR "class: 12 label: \"member\" color:blue"
......@@ -86,6 +86,9 @@
#define PRINT_TYPE_ENT_EDGE(S,T,ATR,...) {fprintf (F, "edge: { sourcename:\""); PRINT_TYPEID(S); fprintf (F, "\" targetname: \""); PRINT_ENTID(T); fprintf (F,"\" " ATR "}\n",##__VA_ARGS__);}
#define PRINT_ENT_ENT_EDGE(S,T,ATR,...) {fprintf (F, "edge: { sourcename:\""); PRINT_ENTID(S); fprintf (F, "\" targetname: \""); PRINT_ENTID(T); fprintf (F,"\" " ATR "}\n",##__VA_ARGS__);}
#define PRINT_ENT_TYPE_EDGE(S,T,ATR,...) {fprintf (F, "edge: { sourcename:\""); PRINT_ENTID(S); fprintf (F, "\" targetname: \""); PRINT_TYPEID(T); fprintf (F,"\" " ATR "}\n",##__VA_ARGS__);}
#define PRINT_NODE_TYPE_EDGE(S,T,ATR,...) {fprintf (F, "edge: { sourcename:\""); PRINT_NODEID(S); fprintf (F, "\" targetname: \""); PRINT_TYPEID(T); fprintf (F,"\" " ATR "}\n",##__VA_ARGS__);}
#define PRINT_NODE_ENT_EDGE(S,T,ATR,...) {fprintf (F, "edge: { sourcename:\""); PRINT_NODEID(S); fprintf (F, "\" targetname: \""); PRINT_ENTID(T); fprintf (F,"\" " ATR "}\n",##__VA_ARGS__);}
#define PRINT_ENT_NODE_EDGE(S,T,ATR,...) {fprintf (F, "edge: { sourcename:\""); PRINT_ENTID(S); fprintf (F, "\" targetname: \""); PRINT_NODEID(T); fprintf (F,"\" " ATR "}\n",##__VA_ARGS__);}
/* A suffix to manipulate the file name. */
......@@ -709,36 +712,22 @@ static void dump_node2type_edges (ir_node *n, void *env)
break;
case iro_SymConst:
if ( (get_SymConst_kind(n) == type_tag)
|| (get_SymConst_kind(n) == size)) {
fprintf (F, "edge: { sourcename: \"");
PRINT_NODEID(n);
fprintf (F, "\" targetname: \"%p\" "
NODE2TYPE_EDGE_ATTR "}\n", get_SymConst_type(n));
|| (get_SymConst_kind(n) == size))
{
PRINT_NODE_TYPE_EDGE(n,get_SymConst_type(n),NODE2TYPE_EDGE_ATTR);
}
break;
case iro_Sel: {
fprintf (F, "edge: { sourcename: \"");
PRINT_NODEID(n);
fprintf (F, "\" targetname: \"%p\" "
NODE2TYPE_EDGE_ATTR "}\n", get_Sel_entity(n));
PRINT_NODE_ENT_EDGE(n,get_Sel_entity(n),NODE2TYPE_EDGE_ATTR);
} break;
case iro_Call: {
fprintf (F, "edge: { sourcename: \"");
PRINT_NODEID(n);
fprintf (F, "\" targetname: \"%p\" "
NODE2TYPE_EDGE_ATTR "}\n", get_Call_type(n));
PRINT_NODE_TYPE_EDGE(n,get_Call_type(n),NODE2TYPE_EDGE_ATTR);
} break;
case iro_Alloc: {
fprintf (F, "edge: { sourcename: \"");
PRINT_NODEID(n);
fprintf (F, "\" targetname: \"%p\" "
NODE2TYPE_EDGE_ATTR "}\n", get_Alloc_type(n));
PRINT_NODE_TYPE_EDGE(n,get_Alloc_type(n),NODE2TYPE_EDGE_ATTR);
} break;
case iro_Free: {
fprintf (F, "edge: { sourcename: \"");
PRINT_NODEID(n);
fprintf (F, "\" targetname: \"%p\" "
NODE2TYPE_EDGE_ATTR "}\n", get_Free_type(n));
PRINT_NODE_TYPE_EDGE(n,get_Free_type(n),NODE2TYPE_EDGE_ATTR);
} break;
default:
break;
......@@ -892,11 +881,7 @@ dump_type_info (type_or_ent *tore, void *env) {
if (is_atomic_entity(ent)) {
value = get_atomic_ent_value(ent);
if (value) {
fprintf (F, "edge: { sourcename: \"");
PRINT_ENTID(ent);
fprintf (F, "\" targetname: \"");
PRINT_NODEID(value);
fprintf(F, "\" " ENT_VALUE_EDGE_ATTR " %d \"}\n", i);
PRINT_ENT_NODE_EDGE(ent,value,ENT_VALUE_EDGE_ATTR,i);
/*
fprintf (F, "edge: { sourcename: \"%p\" targetname: \"", GET_ENTID(ent));
PRINT_NODEID(value);
......@@ -909,11 +894,7 @@ dump_type_info (type_or_ent *tore, void *env) {
for (i = 0; i < get_compound_ent_n_values(ent); i++) {
value = get_compound_ent_value(ent, i);
if (value) {
fprintf (F, "edge: { sourcename: \"");
PRINT_ENTID(ent);
fprintf (F, "\" targetname: \"");
PRINT_NODEID(value);
fprintf(F, "\" " ENT_VALUE_EDGE_ATTR " %d \"}\n", i);
PRINT_ENT_NODE_EDGE(ent,value,ENT_VALUE_EDGE_ATTR,i);
dump_const_expression(value);
PRINT_ENT_ENT_EDGE(ent,get_compound_ent_value_member(ent, i),ENT_CORR_EDGE_ATTR,i);
/*
......
......@@ -41,7 +41,7 @@ offset: -1
irg = g17"
}
edge: { sourcename:"e4" targetname: "t2" class: 3 label: "type" color: red}
edge: { sourcename: "e4" targetname: "n3" label: "value 0 "}
edge: { sourcename:"e4" targetname: "n3" label: "value 0"}
node: {title: "n3" label: "&(GlobalType_ARRAY-HEAP_EXAMPLE_main)P 3" color: yellow}
node: {title: "t0" label: "class GlobalType"info1: "state: layout_undefined
size: -1B,
......
......@@ -96,7 +96,7 @@ offset: -1
irg = g18"
}
edge: { sourcename:"e5" targetname: "t3" class: 3 label: "type" color: red}
edge: { sourcename: "e5" targetname: "n4" label: "value 0 "}
edge: { sourcename:"e5" targetname: "n4" label: "value 0"}
node: {title: "n4" label: "&(ARRAY-STACK_EXAMPLE_main)P 4" color: yellow}
node: {title: "t2" label: "class ARRAY-STACK_EXAMPLE"info1: "state: layout_undefined
size: -1B,
......@@ -107,6 +107,6 @@ mode: P,
size: 4B,
"}
edge: { sourcename:"t3" targetname: "t1" class: 6 label: "res 0" color: green}
edge: { sourcename: "n44" targetname: "0x80a1908" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename: "n46" targetname: "0x80a1990" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename:"n44" targetname: "e21" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename:"n46" targetname: "e24" class: 2 priority: 2 linestyle: dotted}
}
......@@ -52,7 +52,7 @@ offset: -1
irg = g60"
}
edge: { sourcename:"e7" targetname: "t5" class: 3 label: "type" color: red}
edge: { sourcename: "e7" targetname: "n6" label: "value 0 "}
edge: { sourcename:"e7" targetname: "n6" label: "value 0"}
node: {title: "n6" label: "&(PRIMA_set_a)P 6" color: yellow}
node: {title: "t5" label: "method set_a"info1: "state: layout_fixed,
mode: P,
......@@ -78,7 +78,7 @@ offset: -1
irg = g83"
}
edge: { sourcename:"e10" targetname: "t8" class: 3 label: "type" color: red}
edge: { sourcename: "e10" targetname: "n9" label: "value 0 "}
edge: { sourcename:"e10" targetname: "n9" label: "value 0"}
node: {title: "n9" label: "&(PRIMA_c)P 9" color: yellow}
node: {title: "t8" label: "method c"info1: "state: layout_fixed,
mode: P,
......@@ -109,6 +109,6 @@ offset: -1
irg = g26"
}
edge: { sourcename:"e13" targetname: "t11" class: 3 label: "type" color: red}
edge: { sourcename: "e13" targetname: "n12" label: "value 0 "}
edge: { sourcename:"e13" targetname: "n12" label: "value 0"}
node: {title: "n12" label: "&(GlobalType_OO_INLINE_EXAMPLE_main)P 12" color: yellow}
}
......@@ -73,7 +73,7 @@ offset: -1
irg = g18"
}
edge: { sourcename:"e4" targetname: "t2" class: 3 label: "type" color: red}
edge: { sourcename: "e4" targetname: "n3" label: "value 0 "}
edge: { sourcename:"e4" targetname: "n3" label: "value 0"}
node: {title: "n3" label: "&(GlobalType_GLOBAL_VAR_main)P 3" color: yellow}
node: {title: "t2" label: "method GLOBAL_VAR_main"info1: "state: layout_fixed,
mode: P,
......@@ -86,5 +86,5 @@ size: 4B,
node: {title: "t6" label: "class GLOBAL_VAR_mainframe_tp"info1: "state: layout_undefined
size: -1B,
" color: green}
edge: { sourcename: "n38" targetname: "0x809f1f0" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename:"n38" targetname: "e5" class: 2 priority: 2 linestyle: dotted}
}
......@@ -99,7 +99,7 @@ offset: -1
irg = g60"
}
edge: { sourcename:"e7" targetname: "t5" class: 3 label: "type" color: red}
edge: { sourcename: "e7" targetname: "n6" label: "value 0 "}
edge: { sourcename:"e7" targetname: "n6" label: "value 0"}
node: {title: "n6" label: "&(PRIMA_set_a)P 6" color: yellow}
node: {title: "t5" label: "method set_a"info1: "state: layout_fixed,
mode: P,
......@@ -129,7 +129,7 @@ offset: -1
irg = g83"
}
edge: { sourcename:"e10" targetname: "t8" class: 3 label: "type" color: red}
edge: { sourcename: "e10" targetname: "n9" label: "value 0 "}
edge: { sourcename:"e10" targetname: "n9" label: "value 0"}
node: {title: "n9" label: "&(PRIMA_c)P 9" color: yellow}
node: {title: "t8" label: "method c"info1: "state: layout_fixed,
mode: P,
......@@ -151,7 +151,7 @@ offset: -1
irg = g26"
}
edge: { sourcename:"e13" targetname: "t11" class: 3 label: "type" color: red}
edge: { sourcename: "e13" targetname: "n12" label: "value 0 "}
edge: { sourcename:"e13" targetname: "n12" label: "value 0"}
node: {title: "n12" label: "&(GlobalType_OO_INLINE_EXAMPLE_main)P 12" color: yellow}
node: {title: "t0" label: "class GlobalType"info1: "state: layout_undefined
size: -1B,
......@@ -165,8 +165,8 @@ edge: { sourcename:"t11" targetname: "t1" class: 6 label: "res 0" color: green}
node: {title: "t14" label: "class OO_INLINE_EXAMPLE_mainframe_tp"info1: "state: layout_undefined
size: -1B,
" color: green}
edge: { sourcename: "n199" targetname: "0x80a0600" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename: "n201" targetname: "0x80a0538" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename: "n202" targetname: "0x80a0538" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename: "n207" targetname: "0x80a0600" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename:"n199" targetname: "e4" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename:"n201" targetname: "t2" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename:"n202" targetname: "t2" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename:"n207" targetname: "e4" class: 2 priority: 2 linestyle: dotted}
}
......@@ -110,7 +110,7 @@ offset: -1
irg = g60"
}
edge: { sourcename:"e7" targetname: "t5" class: 3 label: "type" color: red}
edge: { sourcename: "e7" targetname: "n6" label: "value 0 "}
edge: { sourcename:"e7" targetname: "n6" label: "value 0"}
node: {title: "n6" label: "&(PRIMA_set_a)P 6" color: yellow}
node: {title: "t5" label: "method set_a"info1: "state: layout_fixed,
mode: P,
......@@ -131,7 +131,7 @@ offset: -1
irg = g83"
}
edge: { sourcename:"e10" targetname: "t8" class: 3 label: "type" color: red}
edge: { sourcename: "e10" targetname: "n9" label: "value 0 "}
edge: { sourcename:"e10" targetname: "n9" label: "value 0"}
node: {title: "n9" label: "&(PRIMA_c)P 9" color: yellow}
node: {title: "e13"label: "ent OO_PROGRAM_EXAMPLE_main" color: yellow
info1:"
......@@ -146,7 +146,7 @@ offset: -1
irg = g26"
}
edge: { sourcename:"e13" targetname: "t11" class: 3 label: "type" color: red}
edge: { sourcename: "e13" targetname: "n12" label: "value 0 "}
edge: { sourcename:"e13" targetname: "n12" label: "value 0"}
node: {title: "n12" label: "&(GlobalType_OO_PROGRAM_EXAMPLE_main)P 12" color: yellow}
node: {title: "t0" label: "class GlobalType"info1: "state: layout_undefined
size: -1B,
......@@ -160,10 +160,10 @@ edge: { sourcename:"t11" targetname: "t1" class: 6 label: "res 0" color: green}
node: {title: "t14" label: "class OO_PROGRAM_EXAMPLE_mainframe_tp"info1: "state: layout_undefined
size: -1B,
" color: green}
edge: { sourcename: "n105" targetname: "0x80a04f0" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename: "n108" targetname: "0x80a0298" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename: "n109" targetname: "0x80a0298" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename: "n111" targetname: "0x80a0550" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename: "n113" targetname: "0x80a03e8" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename: "n115" targetname: "0x80a0480" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename:"n105" targetname: "t8" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename:"n108" targetname: "t2" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename:"n109" targetname: "t2" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename:"n111" targetname: "e10" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename:"n113" targetname: "t5" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename:"n115" targetname: "e7" class: 2 priority: 2 linestyle: dotted}
}
......@@ -86,7 +86,7 @@ offset: -1
irg = g60"
}
edge: { sourcename:"e7" targetname: "t5" class: 3 label: "type" color: red}
edge: { sourcename: "e7" targetname: "n6" label: "value 0 "}
edge: { sourcename:"e7" targetname: "n6" label: "value 0"}
node: {title: "n6" label: "&(PRIMA_set_a)P 6" color: yellow}
node: {title: "t5" label: "method set_a"info1: "state: layout_fixed,
mode: P,
......@@ -116,7 +116,7 @@ offset: -1
irg = g83"
}
edge: { sourcename:"e10" targetname: "t8" class: 3 label: "type" color: red}
edge: { sourcename: "e10" targetname: "n9" label: "value 0 "}
edge: { sourcename:"e10" targetname: "n9" label: "value 0"}
node: {title: "n9" label: "&(PRIMA_c)P 9" color: yellow}
node: {title: "t8" label: "method c"info1: "state: layout_fixed,
mode: P,
......@@ -128,5 +128,5 @@ edge: { sourcename:"t8" targetname: "t1" class: 6 label: "res 0" color: green}
node: {title: "t71" label: "class cframe_tp"info1: "state: layout_undefined
size: -1B,
" color: green}
edge: { sourcename: "n248" targetname: "0x80a0600" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename:"n248" targetname: "e4" class: 2 priority: 2 linestyle: dotted}
}
......@@ -74,7 +74,7 @@ offset: -1
irg = g60"
}
edge: { sourcename:"e7" targetname: "t5" class: 3 label: "type" color: red}
edge: { sourcename: "e7" targetname: "n6" label: "value 0 "}
edge: { sourcename:"e7" targetname: "n6" label: "value 0"}
node: {title: "n6" label: "&(PRIMA_set_a)P 6" color: yellow}
node: {title: "t5" label: "method set_a"info1: "state: layout_fixed,
mode: P,
......@@ -104,7 +104,7 @@ offset: -1
irg = g83"
}
edge: { sourcename:"e10" targetname: "t8" class: 3 label: "type" color: red}
edge: { sourcename: "e10" targetname: "n9" label: "value 0 "}
edge: { sourcename:"e10" targetname: "n9" label: "value 0"}
node: {title: "n9" label: "&(PRIMA_c)P 9" color: yellow}
node: {title: "t8" label: "method c"info1: "state: layout_fixed,
mode: P,
......@@ -116,5 +116,5 @@ edge: { sourcename:"t8" targetname: "t1" class: 6 label: "res 0" color: green}
node: {title: "t48" label: "class set_aframe_tp"info1: "state: layout_undefined
size: -1B,
" color: green}
edge: { sourcename: "n224" targetname: "0x80a0600" class: 2 priority: 2 linestyle: dotted}
edge: { sourcename:"n224" targetname: "e4" class: 2 priority: 2 linestyle: dotted}
}
......@@ -57,7 +57,7 @@ offset: -1
irg = g18"
}
edge: { sourcename:"e5" targetname: "t3" class: 3 label: "type" color: red}
edge: { sourcename: "e5" targetname: "n4" label: "value 0 "}
edge: { sourcename:"e5" targetname: "n4" label: "value 0"}
node: {title: "n4" label: "&(ARRAY-STACK_EXAMPLE_main)P 4" color: yellow}
node: {title: "t2" label: "class ARRAY-STACK_EXAMPLE"info1: "state: layout_undefined
size: -1B,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment