summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bepeephole.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2015-10-02 18:43:18 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2015-10-02 20:30:01 +0200
commitb5bbe9e5f65205f8f92d2a447feedf35b9b582f6 (patch)
tree28d21dcc9241c9a1fecc6d3dbb3455580afca1ec /ir/be/bepeephole.c
parent44f421884f95ef694cc2f51f0c3160afe84d6f2c (diff)
be: Add and use be_peephole_replace().
It combines sched_add_before() and be_peephole_exchange().
Diffstat (limited to 'ir/be/bepeephole.c')
-rw-r--r--ir/be/bepeephole.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ir/be/bepeephole.c b/ir/be/bepeephole.c
index b90c68e..bde4d58 100644
--- a/ir/be/bepeephole.c
+++ b/ir/be/bepeephole.c
@@ -137,6 +137,12 @@ void be_peephole_exchange(ir_node *old, ir_node *nw)
be_liveness_introduce(lv, nw);
}
+void be_peephole_replace(ir_node *const old, ir_node *const nw)
+{
+ sched_add_before(old, nw);
+ be_peephole_exchange(old, nw);
+}
+
ir_node *be_peephole_to_tuple(ir_node *const node)
{
be_liveness_remove(lv, node);