fixed debug output of unary x87 nodes
[libfirm] / ir / be / bespill.h
1 /*
2  * Author:      Daniel Grund, Sebastian Hack
3  * Date:                29.09.2005
4  * Copyright:   (c) Universitaet Karlsruhe
5  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
6  */
7 #ifndef BESPILL_H_
8 #define BESPILL_H_
9
10 #include "firm_types.h"
11 #include "set.h"
12 #include "pset.h"
13 #include "debug.h"
14
15 #include "bechordal.h"
16 #include "be_t.h"
17
18 #include "bearch.h"
19
20 typedef struct _spill_env_t spill_env_t;
21
22 /**
23  * Creates a new spill environment.
24  *
25  * @param chordal
26  */
27 spill_env_t *be_new_spill_env(const be_chordal_env_t *chordal);
28
29 /**
30  * Deletes a spill environment.
31  */
32 void be_delete_spill_env(spill_env_t *senv);
33
34 void be_add_reload(spill_env_t *senv, ir_node *to_spill, ir_node *before);
35
36 void be_add_reload_on_edge(spill_env_t *senv, ir_node *to_spill, ir_node *bl, int pos);
37
38 void be_insert_spills_reloads(spill_env_t *senv);
39
40 /**
41  * Marks a phi-node for spilling. So when reloading from this phi-node, not
42  * only its value but the whole phi will be spilled.
43  * This might place be_Copy nodes in predecessor blocks.
44  */
45 void be_spill_phi(spill_env_t *env, ir_node *node);
46
47 /**
48  * Sets the debug module of a spill environment.
49  */
50 DEBUG_ONLY(void be_set_spill_env_dbg_module(spill_env_t *env, firm_dbg_module_t *dbg));
51
52 #endif /* BESPILL_H_ */