be_liveness_dumpto
[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 <stdio.h>
11
12 /**
13  * Compute the inter block liveness for a graph.
14  * @param irg The graph.
15  */
16 void be_liveness(ir_graph *irg);
17
18 /**
19  * Dump the liveness information for a graph.
20  * @param f The output.
21  * @param irg The graph.
22  */
23 void be_liveness_dump(ir_graph *irg, FILE *f);
24
25 /**
26  * Dump the liveness information for a graph.
27  * @param irg The graph.
28  * @param cls_name A string used as substing in the filename.
29  */
30 void be_liveness_dumpto(ir_graph *irg, const char *cls_name);
31
32 /**
33  * Check, if a node is live in at a block.
34  * @param block The block.
35  * @param irn The node to check for.
36  * @return 1, if @p irn is live at the entrance of @p block, 0 if not.
37  */
38 int (is_live_in)(const ir_node *block, const ir_node *irn);
39
40 /**
41  * Check, if a node is live out at a block.
42  * @param block The block.
43  * @param irn The node to check for.
44  * @return 1, if @p irn is live at the exit of @p block, 0 if not.
45  */
46 int (is_live_out)(const ir_node *block, const ir_node *irn);
47
48 /**
49  * Check, if a node is live at the end of a block.
50  * @param block The block.
51  * @param irn The node to check for.
52  * @return 1, if @p irn is live at the end of the block, 0 if not.
53  */
54 int (is_live_end)(const ir_node *block, const ir_node *irn);
55
56 /**
57  * Check, if the SSA dominance property is fulfilled.
58  * @param irg The graph.
59  */
60 void be_check_dominance(ir_graph *irg);
61
62 #endif