From: Matthias Braun Date: Thu, 24 Feb 2011 18:17:02 +0000 (+0100) Subject: do gigo earlier to avoid optimisations seeing bad inputs with wrong more X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=0814dbdb9e77ad4d1cde3ace8f264d3cc1fe995b;p=libfirm do gigo earlier to avoid optimisations seeing bad inputs with wrong more --- diff --git a/ir/ir/iropt.c b/ir/ir/iropt.c index 2c1727040..0775c9290 100644 --- a/ir/ir/iropt.c +++ b/ir/ir/iropt.c @@ -6500,6 +6500,12 @@ ir_node *optimize_in_place_2(ir_node *n) if (iro == iro_Deleted) return n; + /* Remove nodes with dead (Bad) input. + Run always for transformation induced Bads. */ + n = gigo(n); + if (is_Bad(n)) + return n; + /* constant expression evaluation / constant folding */ if (get_opt_constant_folding()) { /* neither constants nor Tuple values can be evaluated */ @@ -6545,10 +6551,6 @@ ir_node *optimize_in_place_2(ir_node *n) (iro == iro_Proj)) /* Flags tested local. */ n = transform_node(n); - /* Remove nodes with dead (Bad) input. - Run always for transformation induced Bads. */ - n = gigo(n); - /* Now we can verify the node, as it has no dead inputs any more. */ irn_verify(n);