X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbepeephole.h;h=a7f36fc4f244d9337cf2e8284e54564045c95ffa;hb=2669742071b00949c6a5102f39b7df7fd7d3e3fb;hp=fdbe3990290a8370f07d30c3fc3ad62be2a4f593;hpb=e9e2900d59c6a9cc93c1387547235af434d7b92b;p=libfirm diff --git a/ir/be/bepeephole.h b/ir/be/bepeephole.h index fdbe39902..a7f36fc4f 100644 --- a/ir/be/bepeephole.h +++ b/ir/be/bepeephole.h @@ -52,16 +52,25 @@ static INLINE ir_node *be_peephole_get_reg_value(const arch_register_t *reg) typedef void (*peephole_opt_func) (ir_node *node); /** - * must be called from peephole optimisations before a node is exchanged, - * so bepeephole can update it's internal state. - */ -void be_peephole_before_exchange(const ir_node *old_node, ir_node *new_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. */ +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. */ +void be_peephole_exchange(ir_node *old, ir_node *nw); /** - * must be called from peephole optimisations after a node is exchanged, - * so bepeephole can update it's internal state. + * Tries to optimize a beIncSp node with it's previous IncSP node. + * Must be run from a be_peephole_opt() context. + * + * @param node a be_IncSP node + * + * @return the new IncSP node or node itself */ -void be_peephole_after_exchange(ir_node *new_node); +ir_node *be_peephole_IncSP_IncSP(ir_node *node); /** * Do peephole optimisations. It traverses the schedule of all blocks in