X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fana%2Firconsconfirm.c;h=7d9b3fe2ee35b3142a5dd10177808f3f7b7819f1;hb=00894f1e0b6e74ca6c12d253dd30f7d873808977;hp=18557709a025aca8a16eed3d5a5607fccc8f5e73;hpb=4bc38ea2ba218ad082162de7ff3dfeadd5b66561;p=libfirm diff --git a/ir/ana/irconsconfirm.c b/ir/ana/irconsconfirm.c index 18557709a..7d9b3fe2e 100644 --- a/ir/ana/irconsconfirm.c +++ b/ir/ana/irconsconfirm.c @@ -385,9 +385,8 @@ static void insert_Confirm_in_block(ir_node *block, void *env) { ir_node *cmp; pn_Cmp pnc; -#if 0 handle_modeb(block, selector, get_Proj_proj(proj), env); -#endif + /* this should be an IF, check this */ if (! is_Proj(selector)) return; @@ -458,19 +457,9 @@ static void insert_non_null(ir_node *ptr, ir_node *block, env_t *env) { ir_node *blk; - if (is_Confirm(succ)) { - /* beware of loops */ + /* for now, we place a Confirm only in front of a Cmp */ + if (! is_Cmp(succ)) continue; - } - - if ((is_Load(succ) || is_Store(succ)) && - get_nodes_block(succ) == block) { - /* Ignore Loads and Store in the same block for now, - because we are not sure if they are dominated. - This is not a bad restriction: if exception flow is - present, they are in other blocks either. */ - continue; - } pos = get_edge_src_pos(edge); blk = get_effective_use_block(succ, pos); @@ -550,7 +539,7 @@ void construct_confirms(ir_graph *irg) { env.num_eq = 0; env.num_non_null = 0; - if (0 && get_opt_global_null_ptr_elimination()) { + if (get_opt_global_null_ptr_elimination()) { /* do global NULL test elimination */ irg_walk_graph(irg, insert_Confirm, NULL, &env); } else {