X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fopt%2Freturn.c;h=c60b9c12ceec866f97f3b7f541b68515c037661b;hb=8c89e7f37d59bcdcc21d680e1430c712c344938d;hp=59530d9d29f6b1b8990aa1b855c1114a4395594d;hpb=b08bb526b29f6b097deb860bd149acc720ec2d9d;p=libfirm diff --git a/ir/opt/return.c b/ir/opt/return.c index 59530d9d2..c60b9c12c 100644 --- a/ir/opt/return.c +++ b/ir/opt/return.c @@ -33,7 +33,7 @@ /* * Normalize the Returns of a graph by creating a new End block * with One Return(Phi). - * This is the prefered input for the if-conversion. + * This is the preferred input for the if-conversion. * * In pseudocode, it means: * @@ -61,6 +61,7 @@ void normalize_one_return(ir_graph *irg) /* look, if we have more than one return */ n = get_Block_n_cfgpreds(endbl); + assert(n > 0); returns = alloca((n + 7) >> 3); memset(returns, 0, (n + 7) >> 3); @@ -120,7 +121,7 @@ void normalize_one_return(ir_graph *irg) * a new Block was added, so dominator, outs and loop are inconsistent, * trouts and callee-state should be still valid */ - set_irg_dom_inconsistent(irg); + set_irg_doms_inconsistent(irg); set_irg_outs_inconsistent(irg); set_irg_loopinfo_state(current_ir_graph, loopinfo_cf_inconsistent); } @@ -169,7 +170,7 @@ static int can_move_ret(ir_node *ret) /* * Normalize the Returns of a graph by moving * the Returns upwards as much as possible. - * This might be prefered for code generation. + * This might be preferred for code generation. * * In pseudocode, it means: * @@ -312,14 +313,14 @@ void normalize_n_returns(ir_graph *irg) exchange(endbl, new_r_Block(irg, n_finals, in)); - /* the end block is not automatically skiped, so do it here */ + /* the end block is not automatically skipped, so do it here */ set_irg_end_block(irg, skip_Id(get_irg_end_block(irg))); /* Invalidate analysis information: - * Blocks become dead and new Eeturns were deleted, so dominator, outs and loop are inconsistent, + * Blocks become dead and new Returns were deleted, so dominator, outs and loop are inconsistent, * trouts and callee-state should be still valid */ - set_irg_dom_inconsistent(irg); + set_irg_doms_inconsistent(irg); set_irg_outs_inconsistent(irg); set_irg_loopinfo_state(current_ir_graph, loopinfo_cf_inconsistent); }