summaryrefslogtreecommitdiffhomepage
path: root/ir/ir
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2018-03-13 21:28:28 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2018-03-13 21:28:28 +0100
commit5e7893fca96a680cbf35f8294fcac8f94e02a804 (patch)
tree4ba7801095755903b6da1d5e2b452805c29625d3 /ir/ir
parent7b94c7ef2a14e22d0a8a578009017ede5da88971 (diff)
ir: Clean up remove_End_Bads_and_doublets().
Diffstat (limited to 'ir/ir')
-rw-r--r--ir/ir/irnode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ir/ir/irnode.c b/ir/ir/irnode.c
index 16d05ed..aa91482 100644
--- a/ir/ir/irnode.c
+++ b/ir/ir/irnode.c
@@ -489,11 +489,10 @@ void remove_keep_alive(const ir_node *irn)
void remove_End_Bads_and_doublets(ir_node *end)
{
- int n = get_End_n_keepalives(end);
+ int const n = get_End_n_keepalives(end);
if (n <= 0)
return;
- ir_graph *irg = get_irn_irg(end);
pset_new_t keeps;
pset_new_init(&keeps);
@@ -504,15 +503,16 @@ void remove_End_Bads_and_doublets(ir_node *end)
if (is_Bad(ka) || is_NoMem(ka) || pset_new_contains(&keeps, ka)) {
changed = true;
remove_irn_n(end, idx - END_KEEPALIVE_OFFSET);
- --n;
} else {
pset_new_insert(&keeps, ka);
}
}
pset_new_destroy(&keeps);
- if (changed)
+ if (changed) {
+ ir_graph *const irg = get_irn_irg(end);
clear_irg_properties(irg, IR_GRAPH_PROPERTY_CONSISTENT_OUTS);
+ }
}
void free_End(ir_node *end)