X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbespill.h;h=dac022634eba67d6efb892b90b473b216134c6fd;hb=b9d45e08e23bcf058fa8f2d9e18dd78e8cccd044;hp=a0503cd41e55d905a1738b1e71ed5c19d0ed2ca6;hpb=3767f52182607e5de9f0ed7e48d88132317c12d8;p=libfirm diff --git a/ir/be/bespill.h b/ir/be/bespill.h index a0503cd41..dac022634 100644 --- a/ir/be/bespill.h +++ b/ir/be/bespill.h @@ -1,17 +1,15 @@ -/** +/* * Author: Daniel Grund, Sebastian Hack * Date: 29.09.2005 * Copyright: (c) Universitaet Karlsruhe * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. */ - #ifndef BESPILL_H_ #define BESPILL_H_ -#include "firm_config.h" +#include "firm_types.h" #include "set.h" #include "pset.h" -#include "irnode.h" #include "debug.h" #include "bechordal.h" @@ -20,24 +18,35 @@ #include "bearch.h" typedef struct _spill_env_t spill_env_t; -typedef int(*decide_irn_t)(const ir_node*, void*); - -spill_env_t *be_new_spill_env(const be_chordal_env_t *chordal, decide_irn_t is_mem_phi, void *data); +/** + * Creates a new spill environment. + * + * @param chordal + */ +spill_env_t *be_new_spill_env(const be_chordal_env_t *chordal); +/** + * Deletes a spill environment. + */ void be_delete_spill_env(spill_env_t *senv); 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_insert_spills_reloads(spill_env_t *senv, pset *reload_set); +void be_insert_spills_reloads(spill_env_t *senv); /** - * Computes the spill offsets for all spill nodes in the irg + * Marks a phi-node for spilling. So when reloading from this phi-node, not + * only its value but the whole phi will be spilled. + * This might place be_Copy nodes in predecessor blocks. */ -void be_compute_spill_offsets(be_chordal_env_t *cenv); +void be_spill_phi(spill_env_t *env, ir_node *node); +/** + * 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_ */