X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=testprograms%2Frecursions.c;h=e4004668938fcd360bc7fe0288e2b3def861c26b;hb=14e0a034453bd8426ad675a5077c40aa91991e29;hp=c70332ee8ceea6c05856bb18c7ea6844887abc20;hpb=8c07ca61ebff43209b33f42fa300b378ad59e209;p=libfirm diff --git a/testprograms/recursions.c b/testprograms/recursions.c index c70332ee8..e40046689 100644 --- a/testprograms/recursions.c +++ b/testprograms/recursions.c @@ -33,7 +33,7 @@ ir_graph *make_method(char *name, int n_locs) { ir_node *make_Call(ir_graph *c, int n_args, ir_node **args) { - entity *ent = get_irg_ent(c); + entity *ent = get_irg_entity(c); type *mtp = get_entity_type(ent); symconst_symbol sym; sym.entity_p = ent; @@ -49,10 +49,10 @@ ir_node *make_Call(ir_graph *c, int n_args, ir_node **args) { void close_method(int n_ins, ir_node **ins) { ir_node *x = new_Return (get_store(), n_ins, ins); - mature_block (get_cur_block()); - add_in_edge (get_cur_end_block(), x); - mature_block (get_cur_end_block()); - finalize_cons(current_ir_graph); + mature_immBlock (get_cur_block()); + add_immBlock_pred (get_cur_end_block(), x); + mature_immBlock (get_cur_end_block()); + irg_finalize_cons(current_ir_graph); } @@ -172,10 +172,10 @@ main(void) entity **free_methods; int arr_len; - cgana(&arr_len, &free_methods, 0); + cgana(&arr_len, &free_methods); compute_callgraph(); find_callgraph_recursions(); - dump_callgraph(""); + //dump_callgraph(""); /* Order of edges depends on set.c, which is not deterministic. */ cg_construct(arr_len, free_methods); printf("Use xvcg to view these graphs:\n");