summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bepeephole.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2012-11-28 20:16:27 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2012-11-28 23:42:46 +0100
commit40db13dafa724caf3f38f76539cf107cd4c1a376 (patch)
treeefab3a5fb988ec6d383856cc8ac844498ce19562 /ir/be/bepeephole.c
parent21859ae93493117ea48653347ddc6307be93e16f (diff)
bearch: Add and use be_foreach_value().
This also handles the latent problem, that nobody checks, whether the user of a tuple is actually a Proj and not the End node.
Diffstat (limited to 'ir/be/bepeephole.c')
-rw-r--r--ir/be/bepeephole.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/ir/be/bepeephole.c b/ir/be/bepeephole.c
index 9e57bdb..85c242c 100644
--- a/ir/be/bepeephole.c
+++ b/ir/be/bepeephole.c
@@ -93,14 +93,9 @@ static void set_reg_value(ir_node *node)
static void clear_defs(ir_node *node)
{
/* clear values defined */
- if (get_irn_mode(node) == mode_T) {
- foreach_out_edge(node, edge) {
- ir_node *proj = get_edge_src_irn(edge);
- clear_reg_value(proj);
- }
- } else {
- clear_reg_value(node);
- }
+ be_foreach_value(node, value,
+ clear_reg_value(value);
+ );
}
static void set_uses(ir_node *node)