2 * Author: Daniel Grund, Sebastian Hack
4 * Copyright: (c) Universitaet Karlsruhe
5 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
11 #include "firm_types.h"
16 #include "bechordal.h"
21 typedef struct _spill_env_t spill_env_t;
24 * Creates a new spill environment.
28 spill_env_t *be_new_spill_env(const be_chordal_env_t *chordal);
31 * Deletes a spill environment.
33 void be_delete_spill_env(spill_env_t *senv);
35 void be_add_reload(spill_env_t *senv, ir_node *to_spill, ir_node *before);
37 void be_add_reload_on_edge(spill_env_t *senv, ir_node *to_spill, ir_node *bl, int pos);
39 void be_insert_spills_reloads(spill_env_t *senv);
42 * Marks a phi-node for spilling. So when reloading from this phi-node, not
43 * only its value but the whole phi will be spilled.
44 * This might place be_Copy nodes in predecessor blocks.
46 void be_spill_phi(spill_env_t *env, ir_node *node);
49 * Places the necessary copies for the spilled phis in the graph
50 * This has to be done once before be_insert_spill_reloads, after
51 * all phis to spill have been marked with be_spill_phi.
53 void be_place_copies(spill_env_t *env);
56 * Computes the spill offsets for all spill nodes in the irg
58 void be_compute_spill_offsets(be_chordal_env_t *cenv);
61 * Sets the debug module of a spill environment.
63 DEBUG_ONLY(void be_set_spill_env_dbg_module(spill_env_t *env, firm_dbg_module_t *dbg));
65 #endif /* BESPILL_H_ */