From: Sebastian Hack Date: Thu, 23 Feb 2006 14:52:38 +0000 (+0000) Subject: Changed API of RegParams X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=d6382919ff600a373d9ce8c88f030dcfab6104b4;p=libfirm Changed API of RegParams --- diff --git a/ir/be/beabi.c b/ir/be/beabi.c index 08901297f..9fff1b8af 100644 --- a/ir/be/beabi.c +++ b/ir/be/beabi.c @@ -422,8 +422,8 @@ static void modify_irg(be_abi_irg_t *env) n_reg_param += arg->in_reg; } - reg_params = be_new_RegParams(irg, n_reg_param); - reg_params_bl = get_nodes_block(reg_params); + reg_params_bl = get_irg_start_block(irg); + reg_params = be_new_RegParams(irg, reg_params_bl, n_reg_param); reg_params_nr = 0; proj_sp = new_r_Proj(irg, reg_params_bl, reg_params, sp->reg_class->mode, reg_params_nr); diff --git a/ir/be/benode.c b/ir/be/benode.c index b87dcfd6c..5489b8bc4 100644 --- a/ir/be/benode.c +++ b/ir/be/benode.c @@ -365,6 +365,17 @@ ir_node *be_new_StackParam(const arch_register_class_t *cls, ir_graph *irg, ir_n return irn; } +ir_node *be_new_RegParams(ir_graph *irg, ir_node *bl, int n_outs) +{ + be_node_attr_t *a; + ir_node *irn; + ir_node *in[1]; + + irn = new_ir_node(NULL, irg, bl, op_RegParams, mode_T, 0, in); + init_node_attr(irn, NULL, irg, n_outs); + return irn; +} + int be_is_Spill (const ir_node *irn) { return get_irn_be_opcode(irn) == beo_Spill ; } int be_is_Reload (const ir_node *irn) { return get_irn_be_opcode(irn) == beo_Reload ; } int be_is_Copy (const ir_node *irn) { return get_irn_be_opcode(irn) == beo_Copy ; } diff --git a/ir/be/benode_t.h b/ir/be/benode_t.h index fa078f47b..4edfe7ef4 100644 --- a/ir/be/benode_t.h +++ b/ir/be/benode_t.h @@ -77,7 +77,7 @@ be_stack_dir_t be_get_IncSP_direction(ir_node *irn); ir_node *be_new_Call(ir_graph *irg, ir_node *bl, ir_node *mem, ir_node *sp, ir_node *ptr, int n_outs, int n, ir_node *in[]); ir_node *be_new_StackParam(const arch_register_class_t *cls, ir_graph *irg, ir_node *bl, ir_mode *mode, ir_node *frame_pointer, unsigned offset); -ir_node *be_new_RegParams(ir_graph *irg, int n_out); +ir_node *be_new_RegParams(ir_graph *irg, ir_node *bl, int n_out); ir_node *be_new_NoReg(const arch_register_t *reg, ir_graph *irg, ir_node *bl); ir_node *be_spill(const arch_env_t *arch_env, ir_node *irn,ir_node *spill_ctx);