From e1c33a238578342a072e1c95ff12eefe6d0acd37 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Wed, 31 May 2006 16:36:23 +0000 Subject: [PATCH] removed pn_Bound_M_except, Bound now have only one memory output [r7837] --- ir/ir/ircgcons.c | 2 -- ir/ir/ircons.c | 5 ++--- ir/ir/irdump.c | 1 - ir/ir/irnode.h | 7 ++----- ir/ir/iropt.c | 7 +++---- 5 files changed, 7 insertions(+), 15 deletions(-) diff --git a/ir/ir/ircgcons.c b/ir/ir/ircgcons.c index 2346b05ef..fdd4ba0b6 100644 --- a/ir/ir/ircgcons.c +++ b/ir/ir/ircgcons.c @@ -377,8 +377,6 @@ static void prepare_irg_end_except(ir_graph * irg, irg_data_t * data) { in[i] = new_r_Proj(irg, get_nodes_block(node), node, mode_M, pn_Raise_M); } else if (op == op_CopyB) { in[i] = new_r_Proj(irg, get_nodes_block(node), node, mode_M, pn_CopyB_M_except); - } else if (op == op_Bound) { - in[i] = new_r_Proj(irg, get_nodes_block(node), node, mode_M, pn_Bound_M_except); } else { assert(is_fragile_op(node)); /* We rely that all cfops have the memory output at the same position. */ diff --git a/ir/ir/ircons.c b/ir/ir/ircons.c index 637e366d4..6fe658928 100644 --- a/ir/ir/ircons.c +++ b/ir/ir/ircons.c @@ -2221,15 +2221,14 @@ static INLINE ir_node ** new_frag_arr (ir_node *n) arr[0] = new_Proj(n, mode_M, pn_Call_M_except); else if (get_irn_op(n) == op_CopyB) arr[0] = new_Proj(n, mode_M, pn_CopyB_M_except); - else if (get_irn_op(n) == op_Bound) - arr[0] = new_Proj(n, mode_M, pn_Bound_M_except); else { assert((pn_Quot_M == pn_DivMod_M) && (pn_Quot_M == pn_Div_M) && (pn_Quot_M == pn_Mod_M) && (pn_Quot_M == pn_Load_M) && (pn_Quot_M == pn_Store_M) && - (pn_Quot_M == pn_Alloc_M) ); + (pn_Quot_M == pn_Alloc_M) && + (pn_Quot_M == pn_Bound_M)); arr[0] = new_Proj(n, mode_M, pn_Alloc_M); } set_optimize(opt); diff --git a/ir/ir/irdump.c b/ir/ir/irdump.c index d50173a36..4c0af7b5b 100644 --- a/ir/ir/irdump.c +++ b/ir/ir/irdump.c @@ -938,7 +938,6 @@ static const pns_lookup_t bound_lut[] = { X(M), X(X_except), X(res), - X(M_except) #undef X }; diff --git a/ir/ir/irnode.h b/ir/ir/irnode.h index 0f510693c..2b6934fba 100644 --- a/ir/ir/irnode.h +++ b/ir/ir/irnode.h @@ -1011,14 +1011,11 @@ void set_Raise_exo_ptr (ir_node *node, ir_node *exoptr); * Projection numbers for result of Bound node: use for Proj nodes! */ typedef enum { - pn_Bound_M_regular = 0, /**< The memory result. */ + pn_Bound_M = 0, /**< The memory result. */ pn_Bound_X_except = 1, /**< The control flow result branching to the exception handler */ pn_Bound_res = 2, /**< The checked index. */ - pn_Bound_M_except = 3, /**< The memory result in case the runtime function terminated with - an exception */ - pn_Bound_max = 4 /**< number of projections from a Bound */ + pn_Bound_max = 3 /**< number of projections from a Bound */ } pn_Bound; -#define pn_Bound_M pn_Bound_M_regular /** Returns the memory input of a Bound operation. */ ir_node *get_Bound_mem(ir_node *bound); diff --git a/ir/ir/iropt.c b/ir/ir/iropt.c index 43c3de89d..e4647288f 100644 --- a/ir/ir/iropt.c +++ b/ir/ir/iropt.c @@ -1573,10 +1573,9 @@ static ir_node *equivalent_node_Bound(ir_node *n) /* Turn Bound into a tuple (mem, bad, idx) */ ir_node *mem = get_Bound_mem(n); turn_into_tuple(n, pn_Bound_max); - set_Tuple_pred(n, pn_Bound_M_regular, mem); - set_Tuple_pred(n, pn_Bound_X_except, new_Bad()); /* no exception */ - set_Tuple_pred(n, pn_Bound_res, idx); - set_Tuple_pred(n, pn_Bound_M_except, mem); + set_Tuple_pred(n, pn_Bound_M, mem); + set_Tuple_pred(n, pn_Bound_X_except, new_Bad()); /* no exception */ + set_Tuple_pred(n, pn_Bound_res, idx); } return n; } -- 2.20.1