BugFix: the Extbb array was not always in the right order, fixed now
[libfirm] / ir / ana / phiclass.h
1 /**
2  * Analysis to compute phi congruence classes.
3  * @author Daniel Grund
4  * @date 15.01.2005
5  */
6
7 #ifndef _BEPHICONGR_H
8 #define _BEPHICONGR_H
9
10 #include "pset.h"
11 #include "irgraph.h"
12 #include "irnode.h"
13
14 /**
15  * Initialize data structures
16  */
17 void phi_class_init(void);
18
19 /**
20  * Computes all phi classes of an irg.
21  * @param irg The ir-graph to compute the classes for.
22  * @return Sets the internal data structures.
23  */
24 void phi_class_compute(ir_graph *irg);
25
26 /**
27  * Computes all phi classes of an irg. All phi nodes of this irg must be
28  * contained in @p all_phi_nodes. Otherwise the results may be wrong.
29  * @param all_phi_nodes All phi nodes of an irg.
30  * @return A set containing all phi classes as psets
31  */
32 pset *phi_class_compute_by_phis(pset *all_phi_nodes);
33
34 /**
35  * Throws away all allocated memory for phi classes of an irg.
36  * @param irg The ir-graph to free recources for.
37  * @return Frees the internal data structures.
38  */
39 void phi_class_free(ir_graph *irg);
40
41 /**
42  * @param irn A node to get the phi class for
43  * @return A pset containing all members of the phi class @p irn belongs to.
44  *         If @p irn is not member of a phi class NULL is returned.
45  */
46 pset *get_phi_class(const ir_node *irn);
47
48 #endif