X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbenode.h;h=5c8ee1699f4927bfb4c101496267999422437662;hb=52a59fbe6fbd93a12a265842fd08fbc8b12305f8;hp=e338c4fc2bd584fcc88e1a7e0594bf6ae59e97b7;hpb=5427ad0b567409445284277a9c48d652179755ea;p=libfirm diff --git a/ir/be/benode.h b/ir/be/benode.h index e338c4fc2..5c8ee1699 100644 --- a/ir/be/benode.h +++ b/ir/be/benode.h @@ -54,13 +54,6 @@ extern ir_op *op_be_SubSP; extern ir_op *op_be_Start; extern ir_op *op_be_FrameAddr; -/** - * A "symbolic constant" for the size of the stack frame to use with IncSP nodes. - * It gets back-patched to the real size as soon it is known. - */ -#define BE_STACK_FRAME_SIZE_EXPAND INT_MAX -#define BE_STACK_FRAME_SIZE_SHRINK INT_MIN - /** * Determines if irn is a be_node. */ @@ -111,8 +104,7 @@ enum { /** * Make a new Copy node. */ -ir_node *be_new_Copy(const arch_register_class_t *cls, ir_node *block, - ir_node *in); +ir_node *be_new_Copy(ir_node *block, ir_node *in); /** Returns the Copy Argument. */ ir_node *be_get_Copy_op(const ir_node *cpy); /** Sets the Copy Argument. */ @@ -292,10 +284,11 @@ enum { * Projection numbers for result of be_Call node: use for Proj nodes! */ typedef enum { - pn_be_Call_M_regular = pn_Call_M, /**< The memory result of a be_Call. */ - pn_be_Call_sp = pn_Call_max, - pn_be_Call_first_res /**< The first result proj number of a - be_Call. */ + pn_be_Call_M = pn_Call_M, /**< The memory result of a be_Call. */ + pn_be_Call_X_regular = pn_Call_X_regular, + pn_be_Call_X_except = pn_Call_X_except, + pn_be_Call_sp = pn_Call_max+1, + pn_be_Call_first_res /**< The first result proj number of a be_Call. */ } pn_be_Call; /** @@ -370,38 +363,13 @@ int be_Return_append_node(ir_node *ret, ir_node *node); ir_node *be_new_Start(dbg_info *dbgi, ir_node *block, int n_out); -/** - * Make a spill node. - * - * @param irn The node to be spilled. - * @param block the block where the spill should be placed - * @return The new spill node. - */ -ir_node *be_spill(ir_node *block, ir_node *irn); - -/** - * Make a reload and insert it into the schedule. - * - * @param cls The register class of the reloaded value. - * @param insert The node in the schedule in front of which the reload is - * inserted. - * @param mode The mode of the original (spilled) value. - * @param spill The spill node corresponding to this reload. - * @return A freshly made reload. - */ -ir_node *be_reload(const arch_register_class_t *cls, ir_node *insert, - ir_mode *mode, ir_node *spill); - enum { n_be_CopyKeep_op = 0 }; -ir_node *be_new_CopyKeep(const arch_register_class_t *cls, ir_node *block, - ir_node *src, int n, ir_node *in_keep[], - ir_mode *mode); +ir_node *be_new_CopyKeep(ir_node *block, ir_node *src, + int n, ir_node *in_keep[]); -ir_node *be_new_CopyKeep_single(const arch_register_class_t *cls, - ir_node *block, ir_node *src, ir_node *keep, - ir_mode *mode); +ir_node *be_new_CopyKeep_single(ir_node *block, ir_node *src, ir_node *keep); ir_node *be_get_CopyKeep_op(const ir_node *cpy); @@ -487,9 +455,15 @@ ir_node *be_new_Phi(ir_node *block, int n_ins, ir_node **ins, ir_mode *mode, const arch_register_class_t *cls); /** - * irn handler for common be nodes and Phi's. + * Search for output of start node with a specific register + */ +ir_node *be_get_initial_reg_value(ir_graph *irg, const arch_register_t *reg); + +/** + * Search for input of a return node with a specific register and return + * its number. */ -const void *be_node_get_irn_ops(const ir_node *irn); +int be_find_return_reg_input(ir_node *ret, const arch_register_t *reg); static inline int be_is_Spill (const ir_node *irn) { return get_irn_opcode(irn) == beo_Spill ; } static inline int be_is_Reload (const ir_node *irn) { return get_irn_opcode(irn) == beo_Reload ; } @@ -503,7 +477,7 @@ static inline int be_is_Return (const ir_node *irn) { return get_irn_opcode(ir static inline int be_is_IncSP (const ir_node *irn) { return get_irn_opcode(irn) == beo_IncSP ; } static inline int be_is_AddSP (const ir_node *irn) { return get_irn_opcode(irn) == beo_AddSP ; } static inline int be_is_SubSP (const ir_node *irn) { return get_irn_opcode(irn) == beo_SubSP ; } -static inline int be_is_Start (const ir_node *irn) { return get_irn_opcode(irn) == beo_Start; } +static inline int be_is_Start (const ir_node *irn) { return get_irn_opcode(irn) == beo_Start ; } static inline int be_is_FrameAddr(const ir_node *irn) { return get_irn_opcode(irn) == beo_FrameAddr; } #endif