summaryrefslogtreecommitdiffhomepage
path: root/ir/be/belive.h
diff options
context:
space:
mode:
authorSebastian Hack <hack@ipd.info.uni-karlsruhe.de>2006-03-17 10:37:53 +0100
committerSebastian Hack <hack@ipd.info.uni-karlsruhe.de>2006-03-17 10:37:53 +0100
commit391d038495706070a79f042b2928eea7936c8f33 (patch)
tree6210b60dd6404d1dc01e308898c12f31ff6f756e /ir/be/belive.h
parent229d71bbf8ca927eae27da9831007e1e2a01846b (diff)
Moved several functions here.
Diffstat (limited to 'ir/be/belive.h')
-rw-r--r--ir/be/belive.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/ir/be/belive.h b/ir/be/belive.h
index f1be34a..ff0deb7 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 <stdio.h>
/**
@@ -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 */