X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeirgmod.c;h=0cfb3f46cea75c03af69a64223d2f7206c7ee362;hb=bd019d8cd785c1a433c19dee44bf3f9e82397286;hp=6c19e883d29208e3aa56a35caf0d3f1c80dcb046;hpb=ae9fd2c229cc7f4c724ce9ccc9263c16d77670fe;p=libfirm diff --git a/ir/be/beirgmod.c b/ir/be/beirgmod.c index 6c19e883d..0cfb3f46c 100644 --- a/ir/be/beirgmod.c +++ b/ir/be/beirgmod.c @@ -22,7 +22,6 @@ * @brief Backend IRG modification routines. * @author Sebastian Hack, Daniel Grund, Matthias Braun, Christian Wuerdig * @date 04.05.2005 - * @version $Id$ * * This file contains the following IRG modifications for be routines: * - insertion of Perm nodes @@ -87,7 +86,7 @@ ir_node *insert_Perm_after(ir_graph *irg, const arch_register_class_t *cls, ir_nodeset_t live; ir_nodeset_iterator_t iter; - ir_node *curr, *irn, *perm, **nodes; + ir_node *irn, *perm, **nodes; size_t i, n; DBG((dbg, LEVEL_1, "Insert Perm after: %+F\n", pos)); @@ -116,7 +115,6 @@ ir_node *insert_Perm_after(ir_graph *irg, const arch_register_class_t *cls, sched_add_after(pos, perm); free(nodes); - curr = perm; for (i = 0; i < n; ++i) { ir_node *perm_op = get_irn_n(perm, i); const arch_register_t *reg = arch_get_irn_register(perm_op); @@ -126,8 +124,6 @@ ir_node *insert_Perm_after(ir_graph *irg, const arch_register_class_t *cls, ir_node *proj = new_r_Proj(perm, mode, i); arch_set_irn_register(proj, reg); - curr = proj; - be_ssa_construction_init(&senv, irg); be_ssa_construction_add_copy(&senv, perm_op); be_ssa_construction_add_copy(&senv, proj); @@ -165,7 +161,7 @@ static void remove_empty_block(ir_node *block) sched_foreach(block, node) { if (! is_Jmp(node) - && !(arch_irn_get_flags(node) & arch_irn_flags_simple_jump)) + && !(arch_get_irn_flags(node) & arch_irn_flags_simple_jump)) goto check_preds; if (jump != NULL) { /* we should never have 2 jumps in a block */ @@ -184,7 +180,8 @@ static void remove_empty_block(ir_node *block) assert(succ_block == NULL); succ_block = get_edge_src_irn(edge); - if (has_Block_entity(succ_block) && has_Block_entity(block)) { + if (get_Block_entity(succ_block) != NULL + && get_Block_entity(block) != NULL) { /* * Currently we can add only one label for a block. * Therefore we cannot combine them if both block already have one. @@ -195,7 +192,7 @@ static void remove_empty_block(ir_node *block) set_irn_n(succ_block, pos, pred); } - if (has_Block_entity(block)) { + if (get_Block_entity(block) != NULL) { /* move the label to the successor block */ ir_entity *entity = get_Block_entity(block); set_Block_entity(succ_block, entity); @@ -266,9 +263,8 @@ int be_remove_empty_blocks(ir_graph *irg) if (blocks_removed) { /* invalidate analysis info */ - set_irg_doms_inconsistent(irg); - set_irg_extblk_inconsistent(irg); - set_irg_loopinfo_inconsistent(irg); + clear_irg_state(irg, IR_GRAPH_STATE_CONSISTENT_DOMINANCE + | IR_GRAPH_STATE_VALID_EXTENDED_BLOCKS); } return blocks_removed; }