X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbestate.h;h=de73905fe0a0027633debdd32c6b656941771720;hb=493edb72be97161f5c8762e4589631a6e7083a29;hp=3fb9d6faab2df5c1465d6e50ebfa4478a18d516d;hpb=2adf84106c02caf097c2d6cf1764706bdc437bcc;p=libfirm diff --git a/ir/be/bestate.h b/ir/be/bestate.h index 3fb9d6faa..de73905fe 100644 --- a/ir/be/bestate.h +++ b/ir/be/bestate.h @@ -1,31 +1,33 @@ +/* + * This file is part of libFirm. + * Copyright (C) 2012 University of Karlsruhe. + */ + /** * @file * @brief Handles state switching. This is basically the belady spill * algorithm optimized for the 1-register case. * @author Matthias Braun * @date 26.03.2007 - * @version $Id$ - * Copyright: (c) Universitaet Karlsruhe - * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. */ #ifndef FIRM_BE_BESTATE_H #define FIRM_BE_BESTATE_H -#include "irnode.h" -#include "beirg.h" +#include "firm_types.h" #include "bearch.h" /** * Callback that should create a spill for a certain value. Can return NULL * if @p force == 0 and the value can be easily rematerialized */ -typedef ir_node* (*create_spill_func) (void *env, ir_node *value, int force); +typedef ir_node *(*create_spill_func) (void *env, ir_node *value, int force, ir_node *after); /** * Callback that should create a reload for a certain value */ -typedef ir_node* (*create_reload_func) (void *env, ir_node *value, - ir_node *spill, ir_node *before); +typedef ir_node *(*create_reload_func) (void *env, ir_node *value, + ir_node *spill, ir_node *before, + ir_node *last_value); /** * Some state is expressed as a register. nodes defining a value for this @@ -34,7 +36,7 @@ typedef ir_node* (*create_reload_func) (void *env, ir_node *value, * This functions asserts that the state is switched to fullfill all state * requirements of nodes. */ -void be_assure_state(be_irg_t *birg, const arch_register_t *reg, void *func_env, +void be_assure_state(ir_graph *irg, const arch_register_t *reg, void *func_env, create_spill_func spill_func, create_reload_func reload_func);