summaryrefslogtreecommitdiffhomepage
path: root/ir/be/belive.h
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2011-12-21 18:16:12 +0100
committerMatthias Braun <matze@braunis.de>2011-12-22 16:49:27 +0100
commitb482d88d58ce6517bbb6597aa04ffa86ade5f2c9 (patch)
tree3555588ca1cc37ba130b5e44b91cac46c5901c0c /ir/be/belive.h
parent68a3a77f08f0ccdadce9759d6eb19ecd875be7f0 (diff)
belive: cleanup livness assure/invalidate API
This also plugs liveness related memory leaks
Diffstat (limited to 'ir/be/belive.h')
-rw-r--r--ir/be/belive.h41
1 files changed, 16 insertions, 25 deletions
diff --git a/ir/be/belive.h b/ir/be/belive.h
index 792633c..311448b 100644
--- a/ir/be/belive.h
+++ b/ir/be/belive.h
@@ -47,7 +47,7 @@ typedef enum {
* Compute the inter block liveness for a graph.
* @param irg The graph.
*/
-be_lv_t *be_liveness(ir_graph *irg);
+be_lv_t *be_liveness_new(ir_graph *irg);
/**
* Free the liveness information.
@@ -55,9 +55,21 @@ be_lv_t *be_liveness(ir_graph *irg);
void be_liveness_free(be_lv_t *lv);
/**
- * Recompute the complete liveness information.
+ * (Re)compute the liveness information if necessary.
*/
-void be_liveness_recompute(be_lv_t *lv);
+void be_liveness_compute_sets(be_lv_t *lv);
+void be_liveness_compute_chk(be_lv_t *lv);
+
+/**
+ * Invalidate the liveness information.
+ * You must call this if you modify the program and do not
+ * update the liveness with the be_liveness_{update,remove,introduce}
+ * functions.
+ * @note If changed the control flow then you must also call
+ * be_liveness_invalidate_chk()
+ */
+void be_liveness_invalidate_sets(be_lv_t *lv);
+void be_liveness_invalidate_chk(be_lv_t *lv);
/**
* Update the liveness information for a single node.
@@ -148,25 +160,4 @@ void be_liveness_nodes_live_at(const be_lv_t *lv,
const arch_register_class_t *cls,
const ir_node *pos, ir_nodeset_t *live);
-/**
- * Make sure the live sets are computed.
- * @param lv The liveness information.
- */
-void be_liveness_assure_sets(be_lv_t *lv);
-
-/**
- * Make sure all information needed for liveness checks is available.
- * @param lv The liveness information.
- */
-void be_liveness_assure_chk(be_lv_t *lv);
-
-/**
- * Invalidate the liveness information.
- * You must call this if you modify the program and do not
- * update the liveness with the be_liveness_{update,remove,introduce}
- * functions.
- * @param lv The liveness info.
- */
-void be_liveness_invalidate(be_lv_t *lv);
-
-#endif /* FIRM_BE_BELIVE_H */
+#endif