move backend into libfirm
[libfirm] / ir / be / bespillbelady.h
1 /**
2  * Author:      Daniel Grund, Matthias Braun
3  * Date:                20.09.2005
4  * Copyright:   (c) Universitaet Karlsruhe
5  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
6  */
7
8 #ifndef BESPILLBELADY_H_
9 #define BESPILLBELADY_H_
10
11 #include "be_t.h"
12 #include "bechordal.h"
13
14 #include "bearch.h"
15 #include "bespill.h"
16
17 /**
18  * Do spilling for a register class on a graph using the belady heuristic.
19  * In the transformed graph, the register pressure never exceeds the number
20  * of available registers.
21  *
22  * @param birg  The backend graph
23  * @param cls   The register class to spill
24  */
25 void be_spill_belady(be_irg_t *birg, const arch_register_class_t *cls);
26
27 /**
28  * Same as be_spill_belady but reuses an existing spill environment.
29  * This is usefull for "pre-spillers" that create some spills+reloads
30  * but can't ensure that regpressure never exceeds the number of registers
31  */
32 void be_spill_belady_spill_env(be_irg_t *birg, const arch_register_class_t *cls,
33                                spill_env_t *spill_env);
34
35 #endif /*BESPILLBELADY_H_*/