X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=ir%2Fir%2Fircons_t.h;h=46066ccef310d9a27b75e2a1e3c59065eb9b9c09;hb=128e604d933f25072ffdabac43960525592bf05f;hp=4a7a8b88921287d58cac1100b77298a9441529b9;hpb=1ce363f80e6a204d4011f85813362d9bd1d0e7e4;p=libfirm diff --git a/ir/ir/ircons_t.h b/ir/ir/ircons_t.h index 4a7a8b889..46066ccef 100644 --- a/ir/ir/ircons_t.h +++ b/ir/ir/ircons_t.h @@ -38,27 +38,46 @@ * * @see uninitialized_local_variable_func_t */ -void init_cons(uninitialized_local_variable_func_t *func); +void firm_init_cons(uninitialized_local_variable_func_t *func); /** * Creates a new Anchor node. */ ir_node *new_Anchor(ir_graph *irg); -/* 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); -} +/** + * Allocate a frag array for a node if the current graph state is phase_building. + * + * @param irn the node for which the frag array should be allocated + * @param op the opcode of the (original) node, if does not match opcode of irn, + * nothing is done + * @param frag_store the address of the frag store in irn attributes, if this + * address contains a value != NULL, does nothing + */ +void firm_alloc_frag_arr(ir_node *irn, ir_op *op, ir_node ***frag_store); +/** + * 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