From: Matthias Braun Date: Thu, 8 Feb 2007 14:51:05 +0000 (+0000) Subject: never set the startblock to bad (even without the self-referencing loop) X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;ds=sidebyside;h=ec00dc39006d2f664d4a20ed4f5cb70c21015f99;p=libfirm never set the startblock to bad (even without the self-referencing loop) [r8612] --- diff --git a/ir/ir/iropt.c b/ir/ir/iropt.c index 8adb26c32..dcc0a9061 100644 --- a/ir/ir/iropt.c +++ b/ir/ir/iropt.c @@ -3811,7 +3811,13 @@ static INLINE ir_node *gigo(ir_node *node) if (!is_Bad(get_irn_n(block, i))) break; } - if (i == irn_arity) return new_Bad(); + if (i == irn_arity) { + ir_graph *irg = get_irn_irg(block); + /* the start block is never dead */ + if(block != get_irg_start_block(irg) + && block != get_irg_end_block(irg)) + return new_Bad(); + } } }