remove new_.*_defaultProj operations
authorMatthias Braun <matze@braunis.de>
Fri, 9 Dec 2011 15:33:53 +0000 (16:33 +0100)
committerMatthias Braun <matze@braunis.de>
Fri, 9 Dec 2011 17:51:02 +0000 (18:51 +0100)
They're pointless with the new switch representation introduced a while
ago.

include/libfirm/ircons.h
ir/ir/ircons.c

index 935d2a5..696ef54 100644 (file)
@@ -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.
index 902fda8..6272f22 100644 (file)
@@ -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)