X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbecopystat.c;h=f37983f3f6c21c43fb144c487bc4f5ee437cd509;hb=1b4cac3471b02b63e9656cd8c876f067766fe482;hp=1c36a177468b6146e4cee6184e9783cb5a750528;hpb=32bb9cd68eb4e4a550475b5ab516fd1b8de22456;p=libfirm diff --git a/ir/be/becopystat.c b/ir/be/becopystat.c index 1c36a1774..f37983f3f 100644 --- a/ir/be/becopystat.c +++ b/ir/be/becopystat.c @@ -22,7 +22,6 @@ * @brief Copy node statistics. * @author Daniel Grund * @date 19.04.2005 - * @version $Id$ */ #include "config.h" @@ -40,7 +39,6 @@ #include "beutil.h" #include "becopyopt_t.h" #include "becopystat.h" -#include "beirg.h" #include "bemodule.h" #include "beintlive_t.h" @@ -108,7 +106,7 @@ enum vals_t { /** * Holds current values. Values are added till next copystat_reset */ -int curr_vals[ASIZE]; +static int curr_vals[ASIZE]; static ir_nodeset_t *all_phi_nodes; static ir_nodeset_t *all_copy_nodes; @@ -144,10 +142,9 @@ static inline int was_edge_critical(const ir_node *bl, int pos) { const ir_edge_t *edge; const ir_node *bl_at_pos, *bl_before; - assert(is_Block(bl)); /* Does bl have several predecessors ?*/ - if (get_irn_arity(bl) <= 1) + if (get_Block_n_cfgpreds(bl) <= 1) return 0; /* Does the pred have exactly one predecessor */