From 330af274dc3552a170f6ea14605a3d6cfb977373 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Sat, 8 Nov 2008 11:00:02 +0000 Subject: [PATCH] Remove new_{,r}d_{Bad,NoMem}(), which are just pointless wrappers for new_r_{Bad,NoMem}. [r23536] --- include/libfirm/ircons.h | 33 --------------------------------- ir/be/beabi.c | 2 +- ir/ir/ircons.c | 29 ++++------------------------- ir/ir/ircons_t.h | 16 ---------------- 4 files changed, 5 insertions(+), 75 deletions(-) diff --git a/include/libfirm/ircons.h b/include/libfirm/ircons.h index 8b667876a..b69160d95 100644 --- a/include/libfirm/ircons.h +++ b/include/libfirm/ircons.h @@ -1842,15 +1842,6 @@ ir_node *new_rd_Tuple (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *new_rd_Id (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *val, ir_mode *mode); -/** Constructor for a Bad node. - * - * Returns the unique Bad node of the graph. The same as - * get_irg_bad(). - * - * @param *irg The IR graph the node belongs to. - */ -ir_node *new_rd_Bad (ir_graph *irg); - /** Constructor for a Confirm node. * * Specifies constraints for a value. To support dataflow analyses. @@ -1932,15 +1923,6 @@ ir_node *new_rd_EndExcept(dbg_info *db, ir_graph *irg, ir_node *block); ir_node *new_rd_Filter (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *arg, ir_mode *mode, long proj); -/** Constructor for a NoMem node. - * - * Returns the unique NoMem node of the graph. The same as - * get_irg_no_mem(). - * - * @param *irg The IR graph the node belongs to. - */ -ir_node *new_rd_NoMem (ir_graph *irg); - /** Constructor for a Mux node. * * @param *db A pointer for debug information. @@ -3472,13 +3454,6 @@ ir_node *new_d_Tuple (dbg_info *db, int arity, ir_node *in[]); */ ir_node *new_d_Id (dbg_info *db, ir_node *val, ir_mode *mode); -/** Constructor for a Bad node. - * - * Returns the unique Bad node of the graph. The same as - * get_irg_bad(). - */ -ir_node *new_d_Bad (void); - /** Constructor for a Confirm node. * * Constructor for a Confirm node. Adds the node to the block in current_ir_block. @@ -3565,14 +3540,6 @@ ir_node *new_d_Break (dbg_info *db); */ ir_node *new_d_Filter (dbg_info *db, ir_node *arg, ir_mode *mode, long proj); - -/** Constructor for a NoMem node. - * - * Returns the unique NoMem node of the graph. The same as - * get_irg_no_mem(). - */ -ir_node *new_d_NoMem (void); - /** Constructor for a Mux node. * * @param *db A pointer for debug information. diff --git a/ir/be/beabi.c b/ir/be/beabi.c index 9c23902b7..969f20fb6 100644 --- a/ir/be/beabi.c +++ b/ir/be/beabi.c @@ -1898,7 +1898,7 @@ static void modify_irg(be_abi_irg_t *env) /* the arg proj is not needed anymore now and should be only used by the anchor */ assert(get_irn_n_edges(arg_tuple) == 1); kill_node(arg_tuple); - set_irg_args(irg, new_rd_Bad(irg)); + set_irg_args(irg, new_r_Bad(irg)); /* All Return nodes hang on the End node, so look for them there. */ end = get_irg_end_block(irg); diff --git a/ir/ir/ircons.c b/ir/ir/ircons.c index e06063846..2a651a4b6 100644 --- a/ir/ir/ircons.c +++ b/ir/ir/ircons.c @@ -1254,11 +1254,6 @@ new_rd_Sync(dbg_info *db, ir_graph *irg, ir_node *block, int arity, ir_node *in[ return res; } /* new_rd_Sync */ -ir_node * -new_rd_Bad(ir_graph *irg) { - return get_irg_bad(irg); -} /* new_rd_Bad */ - ir_node * new_rd_Confirm(dbg_info *db, ir_graph *irg, ir_node *block, ir_node *val, ir_node *bound, pn_Cmp cmp) { ir_node *res; @@ -1340,11 +1335,6 @@ new_rd_Filter(dbg_info *db, ir_graph *irg, ir_node *block, ir_node *arg, ir_mode return res; } /* new_rd_Filter */ -ir_node * -new_rd_NoMem(ir_graph *irg) { - return get_irg_no_mem(irg); -} /* new_rd_NoMem */ - 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) { @@ -1620,7 +1610,7 @@ ir_node *new_r_Id(ir_graph *irg, ir_node *block, return new_rd_Id(NULL, irg, block, val, mode); } ir_node *new_r_Bad(ir_graph *irg) { - return new_rd_Bad(irg); + return get_irg_bad(irg); } ir_node *new_r_Confirm(ir_graph *irg, ir_node *block, ir_node *val, ir_node *bound, pn_Cmp cmp) { return new_rd_Confirm(NULL, irg, block, val, bound, cmp); @@ -1645,7 +1635,7 @@ ir_node *new_r_Filter(ir_graph *irg, ir_node *block, ir_node *arg, return new_rd_Filter(NULL, irg, block, arg, mode, proj); } ir_node *new_r_NoMem(ir_graph *irg) { - return new_rd_NoMem(irg); + return get_irg_no_mem(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) { @@ -2532,12 +2522,6 @@ new_d_Sync(dbg_info *db, int arity, ir_node *in[]) { return new_rd_Sync(db, current_ir_graph, current_ir_graph->current_block, arity, in); } /* new_d_Sync */ - -ir_node * -(new_d_Bad)(void) { - return _new_d_Bad(); -} /* new_d_Bad */ - ir_node * new_d_Confirm(dbg_info *db, ir_node *val, ir_node *bound, pn_Cmp cmp) { return new_bd_Confirm(db, current_ir_graph->current_block, @@ -2575,11 +2559,6 @@ new_d_Filter(dbg_info *db, ir_node *arg, ir_mode *mode, long proj) { arg, mode, proj); } /* new_d_Filter */ -ir_node * -(new_d_NoMem)(void) { - return _new_d_NoMem(); -} /* new_d_NoMem */ - ir_node * new_d_Mux(dbg_info *db, ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode) { @@ -3010,7 +2989,7 @@ ir_node *new_Id(ir_node *val, ir_mode *mode) { return new_d_Id(NULL, val, mode); } ir_node *new_Bad(void) { - return new_d_Bad(); + return get_irg_bad(current_ir_graph); } ir_node *new_Confirm(ir_node *val, ir_node *bound, pn_Cmp cmp) { return new_d_Confirm(NULL, val, bound, cmp); @@ -3034,7 +3013,7 @@ ir_node *new_Filter(ir_node *arg, ir_mode *mode, long proj) { return new_d_Filter(NULL, arg, mode, proj); } ir_node *new_NoMem(void) { - return new_d_NoMem(); + return get_irg_no_mem(current_ir_graph); } ir_node *new_Mux(ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode) { return new_d_Mux(NULL, sel, ir_false, ir_true, mode); diff --git a/ir/ir/ircons_t.h b/ir/ir/ircons_t.h index 367186a61..46066ccef 100644 --- a/ir/ir/ircons_t.h +++ b/ir/ir/ircons_t.h @@ -80,20 +80,4 @@ void ssa_cons_start(ir_graph *irg, int n_loc); */ void ssa_cons_finish(ir_graph *irg); -/* inline functions */ - -static inline ir_node * -_new_d_Bad(void) { - return get_irg_bad(current_ir_graph); -} - -static inline ir_node * -_new_d_NoMem(void) { - return get_irg_no_mem(current_ir_graph); -} - - -#define new_d_Bad() _new_d_Bad() -#define new_d_NoMem() _new_d_NoMem() - #endif -- 2.20.1