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;
22 typedef int(*decide_irn_t)(const ir_node*, void*);
25 * Creates a new spill environment.
28 * @param is_spilled_phi a function that evaluates a phi node and returns true if it is a spilled phi node
29 * @param data context parameter for the is_spilled_phi function
31 spill_env_t *be_new_spill_env(const be_chordal_env_t *chordal, decide_irn_t is_spilled_phi, void *data);
34 * (re-)sets the is_spilled_phi callback
36 void be_set_is_spilled_phi(spill_env_t *env, decide_irn_t is_spilled_phi, void *data);
39 * Deletes a spill environment.
41 void be_delete_spill_env(spill_env_t *senv);
43 void be_add_reload(spill_env_t *senv, ir_node *to_spill, ir_node *before);
45 void be_add_reload_on_edge(spill_env_t *senv, ir_node *to_spill, ir_node *bl, int pos);
47 void be_insert_spills_reloads(spill_env_t *senv);
50 * Computes the spill offsets for all spill nodes in the irg
52 void be_compute_spill_offsets(be_chordal_env_t *cenv);
55 * Sets the debug module of a spill environment.
57 DEBUG_ONLY(void be_set_spill_env_dbg_module(spill_env_t *env, firm_dbg_module_t *dbg));
59 #endif /* BESPILL_H_ */