X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbessaconstr.h;h=bc63d7e1e8edfbb1a9222c086484a87f81f6d84b;hb=edb89fdd5733701e759588fca01691b30309b093;hp=d7baeeeaeaeaa388a897576307cffc5bba2f0c52;hpb=44dd4365d606bc60bbbf97200b89c903d788ce45;p=libfirm diff --git a/ir/be/bessaconstr.h b/ir/be/bessaconstr.h index d7baeeeae..bc63d7e1e 100644 --- a/ir/be/bessaconstr.h +++ b/ir/be/bessaconstr.h @@ -22,14 +22,13 @@ * @brief SSA construction for a set of nodes * @author Sebastian Hack, Daniel Grund, Matthias Braun, Christian Wuerdig * @date 30.03.2007 - * @version $Id$ * * The problem: Given a value and a set of "copies" that are known to * represent the same abstract value, rewire all usages of the original value * to their closest copy while introducing phis as necessary. * * Algorithm: Mark all blocks in the iterated dominance frontiers of the value - * and it's copies. Link the copies ordered by dominance to the blocks. Then + * and its copies. Link the copies ordered by dominance to the blocks. Then * we search for each use all definitions in the current block, if none is * found, then we search one in the immediate dominator. If we are in a block * of the dominance frontier, create a phi and do the same search for all @@ -49,32 +48,35 @@ #ifndef FIRM_BE_BESSACONSTR_H #define FIRM_BE_BESSACONSTR_H +#include #include "firm_types.h" -#include "bedomfront.h" #include "irnodeset.h" #include "belive.h" #include "bitset.h" #include "beirg.h" #include "pdeq.h" +#include "irnodemap.h" +#include "obst.h" typedef struct be_ssa_construction_env_t { ir_graph *irg; - const be_dom_front_info_t *domfronts; ir_mode *mode; - const arch_register_class_t *phi_cls; + const arch_register_req_t *phi_req; waitq *worklist; const ir_nodeset_t *ignore_uses; ir_node **new_phis; - int iterated_domfront_calculated; + bool iterated_domfront_calculated; + ir_nodemap infos; + struct obstack obst; } be_ssa_construction_env_t; /** * Initializes an SSA construction environment. * - * @param env an SSA empty construction environment - * @param birg + * @param env an empty SSA construction environment + * @param irg the graph */ -void be_ssa_construction_init(be_ssa_construction_env_t *env, be_irg_t *birg); +void be_ssa_construction_init(be_ssa_construction_env_t *env, ir_graph *irg); void be_ssa_construction_add_copy(be_ssa_construction_env_t *env, ir_node *value); @@ -86,7 +88,7 @@ void be_ssa_construction_set_ignore_uses(be_ssa_construction_env_t *env, const ir_nodeset_t *ignore_uses); /** - * Reconstructs the ssa form for all users of node @p node + * Reconstructs the SSA form for all users of node @p node */ void be_ssa_construction_fix_users(be_ssa_construction_env_t *env, ir_node *node); @@ -104,7 +106,7 @@ void be_ssa_construction_update_liveness_phis(be_ssa_construction_env_t *env, ir_node **be_ssa_construction_get_new_phis(be_ssa_construction_env_t *env); /** - * Destroys an ssa construction environment. + * Destroys an SSA construction environment. */ void be_ssa_construction_destroy(be_ssa_construction_env_t *env);