fcc12680820682a2afda157d7fea22deb65ddab0
[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(FILE *f, ir_graph *irg);
24
25 /**
26  * Check, if a node is live in at a block.
27  * @param block The block.
28  * @param irn The node to check for.
29  * @return 1, if @p irn is live at the entrance of @p block, 0 if not.
30  */
31 int (is_live_in)(const ir_node *block, const ir_node *irn);
32
33 /**
34  * Check, if a node is live out 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 exit of @p block, 0 if not.
38  */
39 int (is_live_out)(const ir_node *block, const ir_node *irn);
40
41 /**
42  * Check, if a node is live at the end of 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 end of the block, 0 if not.
46  */
47 int (is_live_end)(const ir_node *block, const ir_node *irn);
48
49 #endif