X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeutil.c;h=373960339ba2e3674813b51bf0b6f0946de9f7c2;hb=040868cbcb834457c8195efbbccf221123c7f153;hp=c196ff78d4a0a1d8b81f439c14241c633853c3eb;hpb=5057c4b3b6c48dc75dee684cd172ce4cfed00da7;p=libfirm diff --git a/ir/be/beutil.c b/ir/be/beutil.c index c196ff78d..373960339 100644 --- a/ir/be/beutil.c +++ b/ir/be/beutil.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -145,7 +145,8 @@ void dump_ir_block_graph_sched(ir_graph *irg, const char *suffix) { DUMP_NODE_EDGE_FUNC old = get_dump_node_edge_hook(); dump_consts_local(0); - set_dump_node_edge_hook(sched_edge_hook); + if (have_sched_info(irg)) + set_dump_node_edge_hook(sched_edge_hook); dump_ir_block_graph(irg, suffix); set_dump_node_edge_hook(old); } @@ -154,7 +155,8 @@ void dump_ir_extblock_graph_sched(ir_graph *irg, const char *suffix) { DUMP_NODE_EDGE_FUNC old = get_dump_node_edge_hook(); dump_consts_local(0); - set_dump_node_edge_hook(sched_edge_hook); + if (have_sched_info(irg)) + set_dump_node_edge_hook(sched_edge_hook); dump_ir_extblock_graph(irg, suffix); set_dump_node_edge_hook(old); } @@ -194,9 +196,9 @@ static void collect_phis(ir_node *irn, void *data) void be_clear_links(ir_graph *irg) { - set_using_irn_link(irg); + ir_reserve_resources(irg, IR_RESOURCE_IRN_LINK); irg_walk_graph(irg, firm_clear_link, NULL, NULL); - clear_using_irn_link(irg); + ir_free_resources(irg, IR_RESOURCE_IRN_LINK); } void be_collect_phis(ir_graph *irg) @@ -217,28 +219,6 @@ unsigned get_num_reachable_nodes(ir_graph *irg) { return num; } -/** - * Sets all node inputs to BAD node. - */ -void be_kill_node(ir_node *irn) { - ir_graph *irg = get_irn_irg(irn); - - assert(!is_Bad(irn)); - -#ifdef DEBUG_libfirm - { - int i, first; - first = 0 - ! is_Block(irn); - - for (i = get_irn_arity(irn) - 1; i >= first; --i) { - set_irn_n(irn, i, get_irg_bad(irg)); - } - } -#endif - - edges_node_deleted(irn, irg); -} - /** * Gets the Proj with number pn from irn. */