From: Matthias Braun Date: Fri, 9 Dec 2011 15:33:53 +0000 (+0100) Subject: remove new_.*_defaultProj operations X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=f2225847f6c7a1986a2f6b35b276d46ca4767c24;p=libfirm remove new_.*_defaultProj operations They're pointless with the new switch representation introduced a while ago. --- diff --git a/include/libfirm/ircons.h b/include/libfirm/ircons.h index 935d2a5a9..696ef5483 100644 --- a/include/libfirm/ircons.h +++ b/include/libfirm/ircons.h @@ -1218,16 +1218,6 @@ FIRM_API ir_node *new_rd_DivRL(dbg_info *db, ir_node *block, ir_node *memop, FIRM_API ir_node *new_rd_strictConv(dbg_info *db, ir_node *block, ir_node *op, ir_mode *mode); -/** Constructor for a defaultProj node. - * - * Represents the default control flow of a Switch-Cond node. - * - * @param *db A pointer for debug information. - * @param arg A node producing a tuple. - * @param max_proj The end position of the value in the tuple. - */ -FIRM_API ir_node *new_rd_defaultProj(dbg_info *db, ir_node *arg, long max_proj); - /** Constructor for an ASM pseudo node. * * @param *db A pointer for debug information. @@ -1337,15 +1327,6 @@ FIRM_API ir_node *new_r_DivRL(ir_node *block, ir_node *memop, */ FIRM_API ir_node *new_r_strictConv(ir_node *block, ir_node *op, ir_mode *mode); -/** Constructor for a defaultProj node. - * - * Represents the default control flow of a Switch-Cond node. - * - * @param arg A node producing a tuple. - * @param max_proj The end position of the value in the tuple. - */ -FIRM_API ir_node *new_r_defaultProj(ir_node *arg, long max_proj); - /** Constructor for an ASM pseudo node. * * @param *block The block the node belong to. @@ -1464,17 +1445,6 @@ FIRM_API ir_node *new_d_DivRL(dbg_info *db, ir_node *memop, */ FIRM_API ir_node *new_d_strictConv(dbg_info *db, ir_node *op, ir_mode *mode); -/** Constructor for a defaultProj node. - * - * Represents the default control flow of a Switch-Cond node. - * Adds the node to the block in current_ir_block. - * - * @param *db A pointer for debug information. - * @param arg A node producing a tuple. - * @param max_proj The end position of the value in the tuple. - */ -FIRM_API ir_node *new_d_defaultProj(dbg_info *db, ir_node *arg, long max_proj); - /** Constructor for an ASM pseudo node. * * @param *db A pointer for debug information. @@ -1579,16 +1549,6 @@ FIRM_API ir_node *new_DivRL(ir_node *memop, ir_node *op1, ir_node *op2, */ FIRM_API ir_node *new_strictConv(ir_node *op, ir_mode *mode); -/** Constructor for a defaultProj node. - * - * Represents the default control flow of a Switch-Cond node. - * Adds the node to the block in current_ir_block. - * - * @param arg A node producing a tuple. - * @param max_proj The end position of the value in the tuple. - */ -FIRM_API ir_node *new_defaultProj(ir_node *arg, long max_proj); - /** Constructor for an ASM pseudo node. * * @param arity The number of data inputs to the node. diff --git a/ir/ir/ircons.c b/ir/ir/ircons.c index 902fda8eb..6272f221e 100644 --- a/ir/ir/ircons.c +++ b/ir/ir/ircons.c @@ -56,16 +56,6 @@ ir_node *new_rd_Const_long(dbg_info *db, ir_graph *irg, ir_mode *mode, return new_rd_Const(db, irg, new_tarval_from_long(value, mode)); } -ir_node *new_rd_defaultProj(dbg_info *db, ir_node *arg, long max_proj) -{ - ir_node *res; - - assert(is_Cond(arg)); - arg->attr.cond.default_proj = max_proj; - res = new_rd_Proj(db, arg, mode_X, max_proj); - return res; -} - ir_node *new_rd_ASM(dbg_info *db, ir_node *block, int arity, ir_node *in[], ir_asm_constraint *inputs, size_t n_outs, ir_asm_constraint *outputs, size_t n_clobber, @@ -152,10 +142,6 @@ ir_node *new_r_simpleSel(ir_node *block, ir_node *store, ir_node *objptr, { return new_rd_Sel(NULL, block, store, objptr, 0, NULL, ent); } -ir_node *new_r_defaultProj(ir_node *arg, long max_proj) -{ - return new_rd_defaultProj(NULL, arg, max_proj); -} ir_node *new_r_ASM(ir_node *block, int arity, ir_node *in[], ir_asm_constraint *inputs, size_t n_outs, ir_asm_constraint *outputs, @@ -378,17 +364,6 @@ ir_node *new_d_Const_long(dbg_info *db, ir_mode *mode, long value) return new_rd_Const_long(db, current_ir_graph, mode, value); } -ir_node *new_d_defaultProj(dbg_info *db, ir_node *arg, long max_proj) -{ - ir_node *res; - assert(is_Cond(arg) || is_Bad(arg)); - assert(get_irg_phase_state(current_ir_graph) == phase_building); - if (is_Cond(arg)) - arg->attr.cond.default_proj = max_proj; - res = new_d_Proj(db, arg, mode_X, max_proj); - return res; -} - ir_node *new_d_simpleSel(dbg_info *db, ir_node *store, ir_node *objptr, ir_entity *ent) { @@ -755,10 +730,6 @@ ir_node *new_simpleSel(ir_node *store, ir_node *objptr, ir_entity *ent) { return new_d_simpleSel(NULL, store, objptr, ent); } -ir_node *new_defaultProj(ir_node *arg, long max_proj) -{ - return new_d_defaultProj(NULL, arg, max_proj); -} ir_node *new_ASM(int arity, ir_node *in[], ir_asm_constraint *inputs, size_t n_outs, ir_asm_constraint *outputs, size_t n_clobber, ident *clobber[], ident *text)