X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fana%2Firconsconfirm.c;h=de475349d345d6fb878067e68e966f84f8206c91;hb=0fbafc8aebc97899bfc5d718f66488288abb8aa4;hp=6a5a80ea01257be85dceac437178f96c295ab022;hpb=7f0c0545e5831792e9937ab27d60fb5005bc5cd1;p=libfirm diff --git a/ir/ana/irconsconfirm.c b/ir/ana/irconsconfirm.c index 6a5a80ea0..de475349d 100644 --- a/ir/ana/irconsconfirm.c +++ b/ir/ana/irconsconfirm.c @@ -24,9 +24,7 @@ * @date 6.2005 * @version $Id$ */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "config.h" #include "irgraph_t.h" #include "irnode_t.h" @@ -457,19 +455,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); @@ -549,7 +537,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 {