half a ton of bugfixes.
[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 "set.h"
12 #include "pset.h"
13 #include "irnode.h"
14 #include "debug.h"
15
16 #include "be_t.h"
17
18 #include "bearch.h"
19
20 typedef struct _spill_env_t spill_env_t;
21 typedef int(*decide_irn_t)(const ir_node*, void*);
22
23
24 spill_env_t *be_new_spill_env(
25                 firm_dbg_module_t *dbg,
26                 const be_main_session_env_t *session,
27                 const arch_register_class_t *cls,
28                 decide_irn_t is_mem_phi,
29                 void *data);
30
31 void be_delete_spill_env(spill_env_t *senv);
32
33 void be_add_reload(spill_env_t *senv, ir_node *to_spill, ir_node *before);
34
35 void be_add_reload_on_edge(spill_env_t *senv, ir_node *to_spill, ir_node *bl, int pos);
36
37 void be_insert_spills_reloads(spill_env_t *senv, pset *reload_set);
38
39 #endif /*BESPILL_H_*/