X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=ir%2Fir%2Fircons_t.h;h=5ea921027cd7c6e3c1bfd1e0f9738b3ced7a8d6e;hb=2c7e601484413ad272d685f9f0cb3ecc27b251f7;hp=64cb2b7fd3203c9f6b1af603a6c099c809556612;hpb=d697a307b98ca3812f0ed43c6f8a404b29613c7e;p=libfirm diff --git a/ir/ir/ircons_t.h b/ir/ir/ircons_t.h index 64cb2b7fd..5ea921027 100644 --- a/ir/ir/ircons_t.h +++ b/ir/ir/ircons_t.h @@ -22,7 +22,6 @@ * @brief Various irnode constructors. Automatic construction * of SSA representation. Private Header * @author Martin Trapp, Christian Schaefer, Michael Beck - * @version $Id$ */ #ifndef FIRM_IR_IRCONS_T_H #define FIRM_IR_IRCONS_T_H @@ -30,20 +29,14 @@ #include "ircons.h" #include "irgraph_t.h" -/** - * Initializes the graph construction. - * - * @param func callback that is called if a uninitialized - * variable is detected - * - * @see uninitialized_local_variable_func_t - */ -void firm_init_cons(uninitialized_local_variable_func_t *func); - /** * Creates a new Anchor node. */ -ir_node *new_Anchor(ir_graph *irg); +ir_node *new_r_Anchor(ir_graph *irg); + +/** create new block node without immediately optimizing it. + * This is an internal helper function for new_ir_graph() */ +ir_node *new_r_Block_noopt(ir_graph *irg, int arity, ir_node *in[]); /** * Allocate a frag array for a node if the current graph state is phase_building. @@ -56,20 +49,28 @@ ir_node *new_Anchor(ir_graph *irg); */ void firm_alloc_frag_arr(ir_node *irn, ir_op *op, ir_node ***frag_store); -/* inline functions */ - -static INLINE ir_node * -_new_d_Bad(void) { - return get_irg_bad(current_ir_graph); -} - -static INLINE ir_node * -_new_d_NoMem(void) { - return get_irg_no_mem(current_ir_graph); -} - +/** + * Restarts SSA construction on the given graph with n_loc + * new values. + * + * @param irg the graph on which the SSA construction is restarted + * @param n_loc number of new variables + * + * After this function is complete, the graph is in phase_building + * again and set_value()/get_value() and mature_block() can be used + * to construct new values. + * + * @note do not use get_mem()/set_mem() they will build a new memory + * instead of modifying the old one which might be not what you expect... + */ +void ssa_cons_start(ir_graph *irg, int n_loc); -#define new_d_Bad() _new_d_Bad() -#define new_d_NoMem() _new_d_NoMem() +/** + * Finalize the (restarted) SSA construction. Matures all blocks that are + * not matured yet and reset the graph state to phase_high. + * + * @param irg the graph on which the SSA construction was restarted + */ +void ssa_cons_finish(ir_graph *irg); #endif