From 12e124bcc9ed93a4037c5122d23e8a6c87f5ef46 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Fri, 14 Dec 2012 23:08:22 +0100 Subject: [PATCH] bepeephole: Inline be_peephole_new_node() into its only caller. --- ir/be/bepeephole.c | 7 +------ ir/be/bepeephole.h | 13 +++---------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/ir/be/bepeephole.c b/ir/be/bepeephole.c index d048af2d7..6ff06f5f6 100644 --- a/ir/be/bepeephole.c +++ b/ir/be/bepeephole.c @@ -96,11 +96,6 @@ static void set_uses(ir_node *node) } } -void be_peephole_new_node(ir_node * nw) -{ - be_liveness_introduce(lv, nw); -} - /** * must be called from peephole optimisations before a node will be killed * and its users will be redirected to new_node. @@ -157,7 +152,7 @@ void be_peephole_exchange(ir_node *old, ir_node *nw) be_peephole_before_exchange(old, nw); sched_remove(old); exchange(old, nw); - be_peephole_new_node(nw); + be_liveness_introduce(lv, nw); } /** diff --git a/ir/be/bepeephole.h b/ir/be/bepeephole.h index a008cdd63..26a53c337 100644 --- a/ir/be/bepeephole.h +++ b/ir/be/bepeephole.h @@ -31,18 +31,11 @@ static inline ir_node *be_peephole_get_reg_value(const arch_register_t *reg) */ typedef void (*peephole_opt_func) (ir_node *node); -/** - * Notify the peephole phase about a newly added node, so it can update its - * internal state. This is not needed for the new node, when - * be_peephole_exchange() is used. - * Note: Contrary to normal exchange you mustn't remove the node from the - * schedule either before exchange. Exchange will do that for you. - */ -void be_peephole_new_node(ir_node *nw); - /** * When doing peephole optimisation use this function instead of plain - * exchange(), so it can update its internal state. */ + * exchange(), so it can update its internal state. This function also removes + * the old node from the schedule. + */ void be_peephole_exchange(ir_node *old, ir_node *nw); /** -- 2.20.1