# include "irvrfy.h"
# include "irdump.h"
# include "firm.h"
+# include "irouts.h"
/**
* This file constructs the ir for the following pseudo-program:
/* Touch ld names to distinguish names from oo_inline names. */
get_entity_ld_ident(proc_set_a_e);
get_entity_ld_ident(proc_c_e);
+
+
+ dump_all_ir_graphs(dump_ir_graph);
dump_all_ir_graphs(dump_ir_block_graph);
+ dump_all_ir_graphs(dump_ir_graph_w_types);
dump_all_ir_graphs(dump_ir_block_graph_w_types);
+ dump_all_ir_graphs(dump_type_graph);
dump_all_types();
+ dump_class_hierarchy (true);
+
+
+ entity **free_methods;
+ int arr_len;
+ cgana(&arr_len, &free_methods);
+ cg_construct(arr_len, free_methods);
+
+ interprocedural_view = 1;
+ dump_ir_graph(main_irg);
+ dump_ir_block_graph(main_irg);
+ dump_ir_graph_w_types(main_irg);
+ dump_ir_block_graph_w_types(main_irg);
+ dump_all_cg_block_graph();
printf("Use xvcg to view these graphs:\n");
printf("/ben/goetz/bin/xvcg GRAPHNAME\n\n");
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80ae350" label: "ARRAY-HEAP_EXAMPLE_main" status:clustered color:white
+graph: { title: "g32" label: "ARRAY-HEAP_EXAMPLE_main" status:clustered color:white
graph: { title: "n49" label: "Block 49" status:clustered color:yellow
edge: {sourcename: "n49" targetname: "n50" label: "0" color: red}
node: {title: "n48" label: "End 48" color: blue info1: "visited: 8
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80ae410" label: "main" status:clustered color:white
+graph: { title: "g33" label: "main" status:clustered color:white
graph: { title: "n47" label: "Block 47" status:clustered color:yellow
edge: {sourcename: "n47" targetname: "n48" label: "0" color: red}
node: {title: "n46" label: "End 46" color: blue info1: "visited: 10
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80aea48" label: "OO_PROGRAM_EXAMPLE_main" status:clustered color:white
+graph: { title: "g37" label: "OO_PROGRAM_EXAMPLE_main" status:clustered color:white
graph: { title: "n108" label: "Block 108" status:clustered color:yellow
edge: {sourcename: "n108" targetname: "n109" label: "0" color: red}
node: {title: "n107" label: "End 107" color: blue info1: "visited: 46
}
-graph: { title: "0x80b1028" label: "set_a" status:clustered color:white
+graph: { title: "g71" label: "set_a" status:clustered color:white
graph: { title: "n186" label: "Block 186" status:clustered color:yellow
edge: {sourcename: "n186" targetname: "n185" label: "0" color: red}
node: {title: "n192" label: "ProjX 0 192" color: yellow info1: "visited: 46
}
-graph: { title: "0x80b3640" label: "c" status:clustered color:white
+graph: { title: "g94" label: "c" status:clustered color:white
graph: { title: "n178" label: "Block 178" status:clustered color:yellow
edge: {sourcename: "n178" targetname: "n177" label: "0" color: red}
node: {title: "n198" label: "ProjX 0 198" color: yellow info1: "visited: 46
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80af6e8" label: "CALL_STR_EXAMPLE_main" status:clustered color:white
+graph: { title: "g45" label: "CALL_STR_EXAMPLE_main" status:clustered color:white
graph: { title: "n56" label: "Block 56" status:clustered color:yellow
edge: {sourcename: "n56" targetname: "n57" label: "0" color: red}
node: {title: "n55" label: "End 55" color: blue info1: "visited: 6
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80ae390" label: "main" status:clustered color:white
+graph: { title: "g29" label: "main" status:clustered color:white
graph: { title: "n61" label: "Block 61" status:clustered color:yellow
edge: {sourcename: "n61" targetname: "n62" label: "0" color: red}
node: {title: "n60" label: "End 60" color: blue info1: "visited: 9
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80ae290" label: "main" status:clustered color:white
+graph: { title: "g29" label: "main" status:clustered color:white
graph: { title: "n46" label: "Block 46" status:clustered color:yellow
edge: {sourcename: "n46" targetname: "n47" label: "0" color: red}
node: {title: "n45" label: "End 45" color: blue info1: "visited: 4
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80ae2d0" label: "main" status:clustered color:white
+graph: { title: "g29" label: "main" status:clustered color:white
graph: { title: "n59" label: "Block 59" status:clustered color:yellow
edge: {sourcename: "n59" targetname: "n60" label: "0" color: red}
node: {title: "n58" label: "End 58" color: blue info1: "visited: 9
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80ad0f8" label: "EMPTY_main" status:clustered color:white
+graph: { title: "g27" label: "EMPTY_main" status:clustered color:white
graph: { title: "n16" label: "Block 16" status:clustered color:yellow
edge: {sourcename: "n16" targetname: "n30" label: "0" color: red}
node: {title: "n17" label: "End 17" color: blue info1: "visited: 4
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80ae450" label: "main" status:clustered color:white
+graph: { title: "g29" label: "main" status:clustered color:white
graph: { title: "n80" label: "Block 80" status:clustered color:yellow
edge: {sourcename: "n80" targetname: "n84" label: "0" color: red}
edge: {sourcename: "n80" targetname: "n81" label: "1" color: red}
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80ad150" label: "FLOAT_EXAMPLE_main" status:clustered color:white
+graph: { title: "g28" label: "FLOAT_EXAMPLE_main" status:clustered color:white
graph: { title: "n17" label: "Block 17" status:clustered color:yellow
edge: {sourcename: "n17" targetname: "n32" label: "0" color: red}
node: {title: "n18" label: "End 18" color: blue info1: "visited: 4
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80ae348" label: "GLOBAL_CSE_EXAMPLE_main" status:clustered color:white
+graph: { title: "g28" label: "GLOBAL_CSE_EXAMPLE_main" status:clustered color:white
graph: { title: "n64" label: "Block 64" status:clustered color:yellow
edge: {sourcename: "n64" targetname: "n65" label: "0" color: red}
node: {title: "n63" label: "End 63" color: blue info1: "visited: 12
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80ae208" label: "GLOBAL_VAR_main" status:clustered color:white
+graph: { title: "g29" label: "GLOBAL_VAR_main" status:clustered color:white
graph: { title: "n40" label: "Block 40" status:clustered color:yellow
edge: {sourcename: "n40" targetname: "n41" label: "0" color: red}
node: {title: "n39" label: "End 39" color: blue info1: "visited: 7
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80aea48" label: "OO_PROGRAM_EXAMPLE_main" status:clustered color:white
+graph: { title: "g37" label: "OO_PROGRAM_EXAMPLE_main" status:clustered color:white
graph: { title: "n108" label: "Block 108" status:clustered color:yellow
edge: {sourcename: "n108" targetname: "n109" label: "0" color: red}
node: {title: "n107" label: "End 107" color: blue info1: "visited: 31
}
-graph: { title: "0x80b1028" label: "set_a" status:clustered color:white
+graph: { title: "g71" label: "set_a" status:clustered color:white
graph: { title: "n186" label: "Block 186" status:clustered color:yellow
edge: {sourcename: "n186" targetname: "n185" label: "0" color: red}
node: {title: "n192" label: "ProjX 0 192" color: yellow info1: "visited: 31
}
-graph: { title: "0x80b3640" label: "c" status:clustered color:white
+graph: { title: "g94" label: "c" status:clustered color:white
graph: { title: "n178" label: "Block 178" status:clustered color:yellow
edge: {sourcename: "n178" targetname: "n177" label: "0" color: red}
node: {title: "n198" label: "ProjX 0 198" color: yellow info1: "visited: 31
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80aea48" label: "OO_PROGRAM_EXAMPLE_main" status:clustered color:white
+graph: { title: "g37" label: "OO_PROGRAM_EXAMPLE_main" status:clustered color:white
graph: { title: "n108" label: "Block 108" status:clustered color:yellow
edge: {sourcename: "n108" targetname: "n109" label: "0" color: red}
node: {title: "n107" label: "End 107" color: blue info1: "visited: 40
}
-graph: { title: "0x80b1028" label: "set_a" status:clustered color:white
+graph: { title: "g71" label: "set_a" status:clustered color:white
graph: { title: "n186" label: "Block 186" status:clustered color:yellow
edge: {sourcename: "n186" targetname: "n185" label: "0" color: red}
node: {title: "n192" label: "ProjX 0 192" color: yellow info1: "visited: 40
}
-graph: { title: "0x80b3640" label: "c" status:clustered color:white
+graph: { title: "g94" label: "c" status:clustered color:white
graph: { title: "n178" label: "Block 178" status:clustered color:yellow
edge: {sourcename: "n178" targetname: "n177" label: "0" color: red}
node: {title: "n198" label: "ProjX 0 198" color: yellow info1: "visited: 40
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80aea48" label: "OO_PROGRAM_EXAMPLE_main" status:clustered color:white
+graph: { title: "g37" label: "OO_PROGRAM_EXAMPLE_main" status:clustered color:white
graph: { title: "n108" label: "Block 108" status:clustered color:yellow
edge: {sourcename: "n108" targetname: "n109" label: "0" color: red}
node: {title: "n107" label: "End 107" color: blue info1: "visited: 20
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80ae2a8" label: "IF_ELSE_EXAMPLE_main" status:clustered color:white
+graph: { title: "g28" label: "IF_ELSE_EXAMPLE_main" status:clustered color:white
graph: { title: "n62" label: "Block 62" status:clustered color:yellow
edge: {sourcename: "n62" targetname: "n63" label: "0" color: red}
node: {title: "n61" label: "End 61" color: blue info1: "visited: 13
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80ae248" label: "IF_EXAMPLE_main" status:clustered color:white
+graph: { title: "g28" label: "IF_EXAMPLE_main" status:clustered color:white
graph: { title: "n17" label: "Block 17" status:clustered color:yellow
edge: {sourcename: "n17" targetname: "n52" label: "0" color: red}
node: {title: "n18" label: "End 18" color: blue info1: "visited: 8
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80ae340" label: "main" status:clustered color:white
+graph: { title: "g28" label: "main" status:clustered color:white
graph: { title: "n65" label: "Block 65" status:clustered color:yellow
edge: {sourcename: "n65" targetname: "n66" label: "0" color: red}
node: {title: "n64" label: "End 64" color: blue info1: "visited: 5
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80ae340" label: "main" status:clustered color:white
+graph: { title: "g28" label: "main" status:clustered color:white
graph: { title: "n62" label: "Block 62" status:clustered color:yellow
edge: {sourcename: "n62" targetname: "n63" label: "0" color: red}
node: {title: "n61" label: "End 61" color: blue info1: "visited: 5
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80ae490" label: "main" status:clustered color:white
+graph: { title: "g29" label: "main" status:clustered color:white
graph: { title: "n78" label: "Block 78" status:clustered color:yellow
edge: {sourcename: "n78" targetname: "n79" label: "0" color: red}
node: {title: "n77" label: "End 77" color: blue info1: "visited: 15
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80aec28" label: "OO_INLINE_EXAMPLE_main" status:clustered color:white
+graph: { title: "g37" label: "OO_INLINE_EXAMPLE_main" status:clustered color:white
graph: { title: "n200" label: "Block 200" status:clustered color:yellow
edge: {sourcename: "n200" targetname: "n202" label: "0" color: red}
edge: {sourcename: "n200" targetname: "n201" label: "1" color: red}
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80aec28" label: "OO_INLINE_EXAMPLE_main" status:clustered color:white
+graph: { title: "g37" label: "OO_INLINE_EXAMPLE_main" status:clustered color:white
graph: { title: "n200" label: "Block 200" status:clustered color:yellow
edge: {sourcename: "n200" targetname: "n202" label: "0" color: red}
edge: {sourcename: "n200" targetname: "n201" label: "1" color: red}
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80aea48" label: "OO_PROGRAM_EXAMPLE_main" status:clustered color:white
+graph: { title: "g37" label: "OO_PROGRAM_EXAMPLE_main" status:clustered color:white
graph: { title: "n108" label: "Block 108" status:clustered color:yellow
edge: {sourcename: "n108" targetname: "n109" label: "0" color: red}
node: {title: "n107" label: "End 107" color: blue info1: "visited: 16
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80b3820" label: "c" status:clustered color:white
+graph: { title: "g94" label: "c" status:clustered color:white
graph: { title: "n248" label: "Block 248" status:clustered color:yellow
edge: {sourcename: "n248" targetname: "n250" label: "0" color: red}
edge: {sourcename: "n248" targetname: "n249" label: "1" color: red}
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80b3820" label: "c" status:clustered color:white
+graph: { title: "g94" label: "c" status:clustered color:white
graph: { title: "n248" label: "Block 248" status:clustered color:yellow
edge: {sourcename: "n248" targetname: "n250" label: "0" color: red}
edge: {sourcename: "n248" targetname: "n249" label: "1" color: red}
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80b1208" label: "set_a" status:clustered color:white
+graph: { title: "g71" label: "set_a" status:clustered color:white
graph: { title: "n225" label: "Block 225" status:clustered color:yellow
edge: {sourcename: "n225" targetname: "n226" label: "0" color: red}
node: {title: "n224" label: "End 224" color: blue info1: "visited: 17
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80b1208" label: "set_a" status:clustered color:white
+graph: { title: "g71" label: "set_a" status:clustered color:white
graph: { title: "n225" label: "Block 225" status:clustered color:yellow
edge: {sourcename: "n225" targetname: "n226" label: "0" color: red}
node: {title: "n224" label: "End 224" color: blue info1: "visited: 16
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80b3640" label: "c" status:clustered color:white
+graph: { title: "g94" label: "c" status:clustered color:white
graph: { title: "n153" label: "Block 153" status:clustered color:yellow
edge: {sourcename: "n153" targetname: "n154" label: "0" color: red}
node: {title: "n152" label: "End 152" color: blue info1: "visited: 13
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80b3640" label: "c" status:clustered color:white
+graph: { title: "g94" label: "c" status:clustered color:white
graph: { title: "n153" label: "Block 153" status:clustered color:yellow
edge: {sourcename: "n153" targetname: "n154" label: "0" color: red}
node: {title: "n152" label: "End 152" color: blue info1: "visited: 9
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80b1028" label: "set_a" status:clustered color:white
+graph: { title: "g71" label: "set_a" status:clustered color:white
graph: { title: "n135" label: "Block 135" status:clustered color:yellow
edge: {sourcename: "n135" targetname: "n136" label: "0" color: red}
node: {title: "n134" label: "End 134" color: blue info1: "visited: 13
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80b1028" label: "set_a" status:clustered color:white
+graph: { title: "g71" label: "set_a" status:clustered color:white
graph: { title: "n135" label: "Block 135" status:clustered color:yellow
edge: {sourcename: "n135" targetname: "n136" label: "0" color: red}
node: {title: "n134" label: "End 134" color: blue info1: "visited: 9
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80ae348" label: "THREE_CFPRED_EXAMPLE_main" status:clustered color:white
+graph: { title: "g28" label: "THREE_CFPRED_EXAMPLE_main" status:clustered color:white
graph: { title: "n77" label: "Block 77" status:clustered color:yellow
edge: {sourcename: "n77" targetname: "n78" label: "0" color: red}
node: {title: "n76" label: "End 76" color: blue info1: "visited: 8
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80ae390" label: "main" status:clustered color:white
+graph: { title: "g29" label: "main" status:clustered color:white
graph: { title: "n67" label: "Block 67" status:clustered color:yellow
edge: {sourcename: "n67" targetname: "n68" label: "0" color: red}
node: {title: "n66" label: "End 66" color: blue info1: "visited: 15
classname 11: "Overwrites"
classname 12: "Member"
-graph: { title: "0x80ae410" label: "main" status:clustered color:white
+graph: { title: "g33" label: "main" status:clustered color:white
graph: { title: "n47" label: "Block 47" status:clustered color:yellow
edge: {sourcename: "n47" targetname: "n48" label: "0" color: red}
node: {title: "n46" label: "End 46" color: blue info1: "visited: 8