2 * Author: Daniel Grund, Matthias Braun
4 * Copyright: (c) Universitaet Karlsruhe
5 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
8 #ifndef BESPILLBELADY_H_
9 #define BESPILLBELADY_H_
12 #include "bechordal.h"
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.
22 * @param birg The backend graph
23 * @param cls The register class to spill
25 void be_spill_belady(be_irg_t *birg, const arch_register_class_t *cls);
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
32 void be_spill_belady_spill_env(be_irg_t *birg, const arch_register_class_t *cls,
33 spill_env_t *spill_env);
35 #endif /*BESPILLBELADY_H_*/