Comments
[libfirm] / ir / be / bephicongr_t.h
1 /**
2  * @author Daniel Grund
3  * @date 09.12.2004
4  */
5
6 #ifndef _BEPHICONGR_T_H
7 #define _BEPHICONGR_T_H
8
9 #include "pset.h"
10 #include "irnode.h"
11
12 typedef struct _phi_info_t {
13         ir_node *phi;           /**< For all nodes of a phi class points to a phi node
14                                                          representing the phi class and holding the ptr to
15                                                          the pset phi_class      or NULL */
16         pset *phi_class;        /**< Only set in phi nodes. A set containing the members
17                                                          of the phi congruence class this phi node represents */
18 } phi_info_t;
19
20 extern size_t phi_irn_data_offset;
21
22 /**
23  * Setting this to 0 will treat const nodes like
24  * all other nodes when computing phi congruence classes.
25  * A non zero value results in splitting phi congruence
26  * classes at all const nodes (except they do share
27  * some non-const nodes too)
28  */
29 #define CONSTS_SPLIT_PHI_CLASSES 0
30 #define get_irn_phi_info(irn)   get_irn_data(irn, phi_info_t, phi_irn_data_offset)
31 #define get_phi_class(irn)      get_irn_phi_info(irn)->phi_class /* Only for phi nodes */
32
33 void be_phi_congr_class_init(void);
34 pset *be_phi_congr_classes(pset *all_phi_nodes);
35
36
37 #endif