The big committ:
[libfirm] / ir / be / bessadestrsimple.h
1 #include "pset.h"
2
3 /**
4  * Insert copys to destruct SSA form and
5  * define variables (numbers) for all SSA-values.
6  * All values in a phi class get assigned the same variable name.
7  * The link field maps values to the var-name
8  *
9  * @return A set mapping SSA values to variables
10  */
11 set *be_ssa_destr_simple(ir_graph *irg, const arch_env_t *aenv);
12
13 void free_ssa_destr_simple(set *vars);
14
15 /**
16  * This struct maps a variable (nr) to the values belonging to this variable
17  */
18 typedef struct _be_var_info_t {
19         int var_nr;             /* the key */
20         pset *values;   /* the ssa-values belonging to this variable */
21 } be_var_info_t;
22
23 /**
24  * The link field of an irn points to the var_info struct
25  * representing the corresponding variable.
26  */
27 #define be_get_var_info(irn)                            ((be_var_info_t *)get_irn_link(irn))
28
29 #define SET_REMOVED -1
30
31 pset *be_get_var_values(set *vals, int var_nr);
32 be_var_info_t *be_var_add_value(set *vars, int var_nr, ir_node *irn);
33 be_var_info_t *be_var_find_or_insert(set *vars, int var_nr);
34 be_var_info_t *be_var_find(set *vars, int var_nr);