added be_set_spill_env_dbg_module() to access anonymous structure
[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
8 #ifndef BESPILL_H_
9 #define BESPILL_H_
10
11 #include "firm_config.h"
12 #include "set.h"
13 #include "pset.h"
14 #include "irnode.h"
15 #include "debug.h"
16
17 #include "bechordal.h"
18 #include "be_t.h"
19
20 #include "bearch.h"
21
22 typedef struct _spill_env_t spill_env_t;
23 typedef int(*decide_irn_t)(const ir_node*, void*);
24
25
26 spill_env_t *be_new_spill_env(const be_chordal_env_t *chordal, decide_irn_t is_mem_phi, void *data);
27
28 void be_delete_spill_env(spill_env_t *senv);
29
30 void be_add_reload(spill_env_t *senv, ir_node *to_spill, ir_node *before);
31
32 void be_add_reload_on_edge(spill_env_t *senv, ir_node *to_spill, ir_node *bl, int pos);
33
34 void be_insert_spills_reloads(spill_env_t *senv, pset *reload_set);
35
36 /**
37  * Computes the spill offsets for all spill nodes in the irg
38  */
39 void be_compute_spill_offsets(be_chordal_env_t *cenv);
40
41 DEBUG_ONLY(void be_set_spill_env_dbg_module(spill_env_t *env, firm_dbg_module_t *dbg));
42
43 #endif /*BESPILL_H_*/