X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbespill.h;h=92e6a9a837a1555b04ad5997cb17845b8ae9fbc0;hb=13dc182ad4f2a1e34735d19cba4bc5bd803e416a;hp=bc8661c3acaef5413850c2872a2d957387a18d76;hpb=72c6789fef73680dd9742bfe76851be717b235f8;p=libfirm diff --git a/ir/be/bespill.h b/ir/be/bespill.h index bc8661c3a..92e6a9a83 100644 --- a/ir/be/bespill.h +++ b/ir/be/bespill.h @@ -8,11 +8,12 @@ #ifndef BESPILL_H_ #define BESPILL_H_ +#include "firm_types.h" #include "set.h" #include "pset.h" -#include "irnode.h" #include "debug.h" +#include "bechordal.h" #include "be_t.h" #include "bearch.h" @@ -20,18 +21,34 @@ typedef struct _spill_env_t spill_env_t; typedef int(*decide_irn_t)(const ir_node*, void*); +/** + * Creates a new spill environment. + * + * @param chordal + * @param is_mem_phi a function that evaluates a Phi node + * @param data context parameter for the is_mem_phi function + */ +spill_env_t *be_new_spill_env(const be_chordal_env_t *chordal, decide_irn_t is_mem_phi, void *data); -spill_env_t *be_new_spill_env( - firm_dbg_module_t *dbg, - const be_main_session_env_t *session, - const arch_register_class_t *cls); - +/** + * Deletes a spill environment. + */ void be_delete_spill_env(spill_env_t *senv); -void be_add_spill(spill_env_t *senv, ir_node *to_spill, ir_node *before); +void be_add_reload(spill_env_t *senv, ir_node *to_spill, ir_node *before); + +void be_add_reload_on_edge(spill_env_t *senv, ir_node *to_spill, ir_node *bl, int pos); -void be_add_spill_on_edge(spill_env_t *senv, ir_node *to_spill, ir_node *bl, int pos); +void be_insert_spills_reloads(spill_env_t *senv, pset *reload_set); -void be_insert_spills_reloads(spill_env_t *senv, pset *reload_set, decide_irn_t is_mem_phi, void *data); +/** + * Computes the spill offsets for all spill nodes in the irg + */ +void be_compute_spill_offsets(be_chordal_env_t *cenv); + +/** + * Sets the debug module of a spill environment. + */ +DEBUG_ONLY(void be_set_spill_env_dbg_module(spill_env_t *env, firm_dbg_module_t *dbg)); -#endif /*BESPILL_H_*/ +#endif /* BESPILL_H_ */