X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=ir%2Fbe%2Fbepeephole.h;h=be93c224c8f499c1ec1701d7bb797ee9a8b4aa6b;hb=c6571686bfbfb3c87ae24ae1dc568e685d6cd49a;hp=fca32e9432551147ab852c800b5deb60dbd2cef1;hpb=6da9f4a53cecb75224fc72978a5862085c88c01d;p=libfirm diff --git a/ir/be/bepeephole.h b/ir/be/bepeephole.h index fca32e943..be93c224c 100644 --- a/ir/be/bepeephole.h +++ b/ir/be/bepeephole.h @@ -21,7 +21,6 @@ * @file * @brief peephole optimisation framework * @author Matthias Braun - * @version $Id$ */ #ifndef BEPEEPHOLE_H #define BEPEEPHOLE_H @@ -73,6 +72,17 @@ ir_node *be_peephole_IncSP_IncSP(ir_node *node); bool be_has_only_one_user(ir_node *node); +/** + * In a scheduled program with registers assigned, + * checks wether @p node can be moved before @p before without changing program + * semantics. + * + * Note: It is allowed to use this function without being in a peephole + * optimization phase. + */ +bool be_can_move_before(ir_heights_t *heights, const ir_node *node, + const ir_node *before); + /** * Do peephole optimisations. It traverses the schedule of all blocks in * backward direction. The register_values variable indicates which (live)