X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fana%2Firlivechk.c;h=c31b2b9ea427e4731eccd10bd794db5a99e9ca44;hb=f6aeac6a547a52beb3cb663c5e63c05c9c3728ea;hp=2d6e91a71e0454a5ac036b56f5300245a2945661;hpb=ed1add2d5c8f8256a31b3347b9acaaf7f3ea644a;p=libfirm diff --git a/ir/ana/irlivechk.c b/ir/ana/irlivechk.c index 2d6e91a71..c31b2b9ea 100644 --- a/ir/ana/irlivechk.c +++ b/ir/ana/irlivechk.c @@ -61,7 +61,7 @@ #include "statev.h" typedef struct _bl_info_t { - ir_node *block; /**< The block. */ + const ir_node *block; /**< The block. */ int be_tgt_calc : 1; int id : 31; /**< a tight number for the block. @@ -87,7 +87,7 @@ struct _lv_chk_t { bl_info_t **map; }; -static void *init_block_data(ir_phase *ph, ir_node *irn, void *old) +static void *init_block_data(ir_phase *ph, const ir_node *irn, void *old) { lv_chk_t *lv = container_of(ph, lv_chk_t, ph); bl_info_t *bi = phase_alloc(ph, sizeof(bi[0])); @@ -112,6 +112,7 @@ static INLINE int is_liveness_node(const ir_node *irn) case iro_Block: case iro_Bad: case iro_End: + case iro_Anchor: return 0; default:; } @@ -164,7 +165,7 @@ static void red_trans_closure(lv_chk_t *lv) } -static void compute_back_edge_chain(lv_chk_t *lv, ir_node *bl) +static void compute_back_edge_chain(lv_chk_t *lv, const ir_node *bl) { bitset_t *tmp = bitset_alloca(lv->n_blocks); bl_info_t *bi = get_block_info(lv, bl); @@ -243,7 +244,7 @@ static INLINE void compute_back_edge_chains(lv_chk_t *lv) lv_chk_t *lv_chk_new(ir_graph *irg, const dfs_t *dfs) { - lv_chk_t *res = xmalloc(sizeof(res[0])); + lv_chk_t *res = XMALLOC(lv_chk_t); struct obstack *obst; int i; @@ -312,7 +313,7 @@ lv_chk_t *lv_chk_new(ir_graph *irg, const dfs_t *dfs) void lv_chk_free(lv_chk_t *lv) { - obstack_free(phase_obst(&lv->ph), NULL); + phase_free(&lv->ph); xfree(lv); }