X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=testprograms%2Farray-heap_example.c;h=a635b32008569da821039cfb149dd6e3838f9efb;hb=a4c85aab2676bbb3138f042ed5bc27a6df8b1903;hp=9750b788b282ac974f76643a58d7f8a09585c76a;hpb=79df37c097fe8cfb7d8e56d30b658f7ce8f6655d;p=libfirm diff --git a/testprograms/array-heap_example.c b/testprograms/array-heap_example.c index 9750b788b..a635b3200 100644 --- a/testprograms/array-heap_example.c +++ b/testprograms/array-heap_example.c @@ -74,7 +74,7 @@ main(void) 32 bit integer value. */ prim_t_int = new_type_primitive(id_from_str ("int", 3), mode_i); - printf("creating an IR graph: ARRAY-HEAP_EXAMPLE...\n"); + printf("\nCreating an IR graph: ARRAY-HEAP_EXAMPLE...\n"); /* first build procedure main */ owner = get_glob_type(); @@ -135,22 +135,23 @@ main(void) x = new_Return (get_store (), 1, in); } - mature_block (main_irg->current_block); + mature_block (get_irg_current_block(main_irg)); /* complete the end_block */ - add_in_edge (main_irg->end_block, x); - mature_block (main_irg->end_block); + add_in_edge (get_irg_end_block(main_irg), x); + mature_block (get_irg_end_block(main_irg)); + + printf("Optimizing ...\n"); + dead_node_elimination(main_irg); /* verify the graph */ irg_vrfy(main_irg); - printf("\nDone building the graph.\n"); printf("Dumping the graph and a type graph.\n"); dump_ir_block_graph (main_irg); dump_type_graph(main_irg); - - printf("\nuse xvcg to view these graphs:\n"); - printf("/ben/goetz/bin/xvcg GRAPHNAME\n"); + printf("use xvcg to view these graphs:\n"); + printf("/ben/goetz/bin/xvcg GRAPHNAME\n\n"); return (1); }