X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbelive.h;h=ff0deb75157e612ab4cdc7476515e2260015126a;hb=6e3e499d6c68aee0c6a9ada6a99f16c4f6f8445b;hp=f1be34a2b031819e1f8e685870ff660ce79dd6bf;hpb=2fc107d78704f79c0bf017957e41870d31923f0b;p=libfirm diff --git a/ir/be/belive.h b/ir/be/belive.h index f1be34a2b..ff0deb751 100644 --- a/ir/be/belive.h +++ b/ir/be/belive.h @@ -8,6 +8,9 @@ #define _BELIVE_H #include "firm_types.h" +#include "pset.h" +#include "bearch_t.h" + #include /** @@ -60,4 +63,37 @@ int (is_live_end)(const ir_node *block, const ir_node *irn); */ void be_check_dominance(ir_graph *irg); +/** + * The liveness transfer function. + * Updates a live set over a single step from a given node to its predecessor. + * Everything defined at the node is removed from the set, the uses of the node get inserted. + * @param arch_env The architecture environment. + * @param cls The register class to consider. + * @param irn The node at which liveness should be computed. + * @param live The set of nodes live before @p irn. This set gets modified by updating it to + * the nodes live after irn. + * @return live. + */ +pset *be_liveness_transfer(const arch_env_t *arch_env, const arch_register_class_t *cls, ir_node *irn, pset *live); + +/** + * Put all node live at the end of a block into a set. + * @param arch_env The architecture environment. + * @param cls The register class to consider. + * @param bl The block. + * @param live The set to put them into. + * @return live. + */ +pset *be_liveness_end_of_block(const arch_env_t *arch_env, const arch_register_class_t *cls, const ir_node *bl, pset *live); + +/** + * Compute a set of nodes which are live at another node. + * @param arch_env The architecture environment. + * @param cls The register class to consider. + * @param pos The node. + * @param live The set to put them into. + * @return live. + */ +pset *be_liveness_nodes_live_at(const arch_env_t *arch_env, const arch_register_class_t *cls, const ir_node *pos, pset *live); + #endif /* _BELIVE_H */