f1be34a2b031819e1f8e685870ff660ce79dd6bf
[libfirm] / ir / be / belive.h
1 /**
2  * Interblock liveness analysis.
3  * @author Sebastian Hack
4  * @date 6.12.2004
5  */
6
7 #ifndef _BELIVE_H
8 #define _BELIVE_H
9
10 #include "firm_types.h"
11 #include <stdio.h>
12
13 /**
14  * Compute the inter block liveness for a graph.
15  * @param irg The graph.
16  */
17 void be_liveness(ir_graph *irg);
18
19 /**
20  * Dump the liveness information for a graph.
21  * @param f The output.
22  * @param irg The graph.
23  */
24 void be_liveness_dump(ir_graph *irg, FILE *f);
25
26 /**
27  * Dump the liveness information for a graph.
28  * @param irg The graph.
29  * @param cls_name A string used as substring in the filename.
30  */
31 void be_liveness_dumpto(ir_graph *irg, const char *cls_name);
32
33 /**
34  * Check, if a node is live in at a block.
35  * @param block The block.
36  * @param irn The node to check for.
37  * @return 1, if @p irn is live at the entrance of @p block, 0 if not.
38  */
39 int (is_live_in)(const ir_node *block, const ir_node *irn);
40
41 /**
42  * Check, if a node is live out at a block.
43  * @param block The block.
44  * @param irn The node to check for.
45  * @return 1, if @p irn is live at the exit of @p block, 0 if not.
46  */
47 int (is_live_out)(const ir_node *block, const ir_node *irn);
48
49 /**
50  * Check, if a node is live at the end of a block.
51  * @param block The block.
52  * @param irn The node to check for.
53  * @return 1, if @p irn is live at the end of the block, 0 if not.
54  */
55 int (is_live_end)(const ir_node *block, const ir_node *irn);
56
57 /**
58  * Check, if the SSA dominance property is fulfilled.
59  * @param irg The graph.
60  */
61 void be_check_dominance(ir_graph *irg);
62
63 #endif /* _BELIVE_H */