X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Fircons.h;h=ed41f5d2deb5d75d9bc67178ffaa04be3ff62267;hb=f9d25133f86594ca2b1f33fb0b41a591ecc9b914;hp=92292b7d09cc29a8ed141bf656803ed76b5bac89;hpb=48f38aff5fdf23d0a9f1d732eb31dfcdd4da5be9;p=libfirm diff --git a/ir/ir/ircons.h b/ir/ir/ircons.h index 92292b7d0..ed41f5d2d 100644 --- a/ir/ir/ircons.h +++ b/ir/ir/ircons.h @@ -291,6 +291,7 @@ * ir_node *new_Proj (ir_node *arg, ir_mode *mode, long proj); * ir_node *new_NoMem (void); * ir_node *new_Mux (ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode); + * ir_node *new_CopyB (ir_node *store, ir_node *dst, ir_node *src, type *data_type); * * void add_immBlock_pred (ir_node *block, ir_node *jmp); * void mature_immBlock (ir_node *block); @@ -936,6 +937,12 @@ * This node is used as input for operations that need a Memory, but do not * change it like Div by const != 0, analyzed calls etc. * + * ir_node *new_CopyB (ir_node *store, ir_node *dst, ir_node *src, type *data_type) + * ----------------------------------------------------------------------------------- + * + * Describes a high level block copy of a compound type form address src to + * address dst. Must be lowered to a Call to a runtime memory copy function. + * * ir_node *new_Proj (ir_node *arg, ir_mode *mode, long proj) * ---------------------------------------------------------- * @@ -1805,6 +1812,21 @@ ir_node *new_rd_NoMem (ir_graph *irg); ir_node *new_rd_Mux (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode); +/** Constructor for a CopyB node. + * + * Adds the node to the block in current_ir_block. + * + * @param *db A pointer for debug information. + * @param *irg The ir graph the node belong to. + * @param *block The block the node belong to. + * @param *store The current memory + * @param *dst The ir_node that represents the destination address. + * @param *arg The ir_node that represents the source address. + * @param *data_type The type of the copied data + */ +ir_node *new_rd_CopyB(dbg_info *db, ir_graph *irg, ir_node *block, + ir_node *store, ir_node *dst, ir_node *src, type *data_type); + /*-------------------------------------------------------------------------*/ /* The raw interface without debug support */ /*-------------------------------------------------------------------------*/ @@ -2490,6 +2512,20 @@ ir_node *new_r_NoMem (ir_graph *irg); ir_node *new_r_Mux (ir_graph *irg, ir_node *block, ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode); +/** Constructor for a CopyB node. + * + * Adds the node to the block in current_ir_block. + * + * @param *irg The ir graph the node belong to. + * @param *block The block the node belong to. + * @param *store The current memory + * @param *dst The ir_node that represents the destination address. + * @param *arg The ir_node that represents the source address. + * @param *data_type The type of the copied data + */ +ir_node *new_r_CopyB(ir_graph *irg, ir_node *block, + ir_node *store, ir_node *dst, ir_node *src, type *data_type); + /*-----------------------------------------------------------------------*/ /* The block oriented interface */ /*-----------------------------------------------------------------------*/ @@ -3191,6 +3227,18 @@ ir_node *new_d_NoMem (void); ir_node *new_d_Mux (dbg_info *db, ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode); +/** Constructor for a CopyB node. + * + * Adds the node to the block in current_ir_block. + * + * @param *db A pointer for debug information. + * @param *store The current memory + * @param *dst The ir_node that represents the destination address. + * @param *arg The ir_node that represents the source address. + * @param *data_type The type of the copied data + */ +ir_node *new_d_CopyB(dbg_info *db, ir_node *store, ir_node *dst, ir_node *src, type *data_type); + /*-----------------------------------------------------------------------*/ /* The block oriented interface without debug support */ /*-----------------------------------------------------------------------*/ @@ -3792,6 +3840,17 @@ ir_node *new_NoMem (void); */ ir_node *new_Mux (ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode); +/** Constructor for a CopyB node. + * + * Adds the node to the block in current_ir_block. + * + * @param *store The current memory + * @param *dst The ir_node that represents the destination address. + * @param *arg The ir_node that represents the source address. + * @param *data_type The type of the copied data + */ +ir_node *new_CopyB(ir_node *store, ir_node *dst, ir_node *src, type *data_type); + /*---------------------------------------------------------------------*/ /* The comfortable interface. */ /* Supports automatic Phi node construction. */ @@ -3816,7 +3875,7 @@ ir_node *new_immBlock (void); /** Add a control flow edge to an immature block. */ void add_immBlock_pred (ir_node *immblock, ir_node *jmp); -/** Fix the number of predecessors of an immature block. */ +/** Finalize a Block node, when all control flows are known. */ void mature_immBlock (ir_node *block); #define mature_cur_block() mature_immBlock(get_cur_block()); @@ -3831,7 +3890,7 @@ void mature_immBlock (ir_node *block); * @param pos The position/id of the local variable. * @param *mode The mode of the value to get. */ -ir_node *get_d_value (dbg_info* db, int pos, ir_mode *mode); +ir_node *get_d_value (dbg_info *db, int pos, ir_mode *mode); ir_node *get_value (int pos, ir_mode *mode); /** Remark a new definition of a variable. @@ -3896,7 +3955,7 @@ void irp_finalize_cons(void); * @return a firm node of mode @p mode that initializes the var at position pos * * @note - * Do not return NULL + * Do not return NULL! * If this function is not set, FIRM will create a const node with tarval BAD. * Use set_irg_loc_description()/get_irg_loc_description() to assign additional * informations to local variables.