From 9412fad1dfb03e71ae4ecf7d6097731885d0c241 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Thu, 24 May 2007 13:00:43 +0000 Subject: [PATCH] Do not add Bad nodes to the keep-alive Removed old (and wrong) comment [r14022] --- ir/ir/irgopt.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ir/ir/irgopt.c b/ir/ir/irgopt.c index 2df5d5c64..5f50eb2bc 100644 --- a/ir/ir/irgopt.c +++ b/ir/ir/irgopt.c @@ -1091,7 +1091,6 @@ int inline_method(ir_node *call, ir_graph *called_graph) { /* -- Performing dead node elimination inlines the graph -- */ /* Copies the nodes to the obstack of current_ir_graph. Updates links to new entities. */ - /* @@@ endless loops are not copied!! -- they should be, I think... */ irg_walk(get_irg_end(called_graph), copy_node_inline, copy_preds, get_irg_frame_type(called_graph)); @@ -1127,8 +1126,11 @@ int inline_method(ir_node *call, ir_graph *called_graph) { /* -- archive keepalives -- */ irn_arity = get_irn_arity(end); - for (i = 0; i < irn_arity; i++) - add_End_keepalive(get_irg_end(current_ir_graph), get_irn_n(end, i)); + for (i = 0; i < irn_arity; i++) { + ir_node *ka = get_End_keepalive(end, i); + if (! is_Bad(ka)) + add_End_keepalive(get_irg_end(current_ir_graph), ka); + } /* The new end node will die. We need not free as the in array is on the obstack: copy_node() only generated 'D' arrays. */ -- 2.20.1