From d2fd32f582815f2c050300f7f10db0fc7a5774ae Mon Sep 17 00:00:00 2001 From: Till Riedel Date: Thu, 22 Apr 2004 12:22:07 +0000 Subject: [PATCH] minor fixes [r2705] --- ir/ana/irouts.c | 2 -- ir/ir/irgopt.c | 21 +++++++-------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/ir/ana/irouts.c b/ir/ana/irouts.c index ff2c402fb..9bb5c9034 100644 --- a/ir/ana/irouts.c +++ b/ir/ana/irouts.c @@ -431,8 +431,6 @@ void free_ip_outs(void) void free_outs(ir_graph *irg) { - /* Update graph state */ - assert(get_irg_phase_state(current_ir_graph) != phase_building); current_ir_graph->outs_state = no_outs; if (irg->outs) free(irg->outs); diff --git a/ir/ir/irgopt.c b/ir/ir/irgopt.c index abedb2732..4511027ec 100644 --- a/ir/ir/irgopt.c +++ b/ir/ir/irgopt.c @@ -602,8 +602,8 @@ void inline_method(ir_node *call, ir_graph *called_graph) { int exc_handling; ir_node *proj; type *called_frame; - if (!get_opt_optimize() || !get_opt_inline() || - (get_irg_inline_property(called_graph) == irg_inline_forbidden)) return; + if ( !(get_irg_inline_property(called_graph) == irg_inline_forced) && (!get_opt_optimize() || !get_opt_inline() || + (get_irg_inline_property(called_graph) == irg_inline_forbidden))) return; /* -- Turn off optimizations, this can cause problems when allocating new nodes. -- */ rem_opt = get_opt_optimize(); @@ -634,13 +634,6 @@ void inline_method(ir_node *call, ir_graph *called_graph) { exc_handling: 0 There is a handler. 1 Branches to End. 2 Exception handling not represented in Firm. -- */ - exc_handling = 2; - for (proj = (ir_node *)get_irn_link(call); proj; proj = (ir_node *)get_irn_link(proj)) { - assert(get_irn_op(proj) == op_Proj); - if (get_Proj_proj(proj) == pn_Call_M_except) { exc_handling = 0; break;} - if (get_Proj_proj(proj) == pn_Call_X_except) { exc_handling = 1; } - } - { ir_node *proj, *Mproj = NULL, *Xproj = NULL; for (proj = (ir_node *)get_irn_link(call); proj; proj = (ir_node *)get_irn_link(proj)) { @@ -648,9 +641,9 @@ void inline_method(ir_node *call, ir_graph *called_graph) { if (get_Proj_proj(proj) == pn_Call_X_except) Xproj = proj; if (get_Proj_proj(proj) == pn_Call_M_except) Mproj = proj; } - if (Mproj) { assert(Xproj); exc_handling = 0; } - else if (Xproj) { exc_handling = 1; } - else { exc_handling = 2; } + if (Mproj) { assert(Xproj); exc_handling = 0; } // Mproj + else if (Xproj) { exc_handling = 1; } //!Mproj && Xproj + else { exc_handling = 2; } //!Mproj && !Xproj } @@ -821,7 +814,7 @@ void inline_method(ir_node *call, ir_graph *called_graph) { Second the Call branches to End, the exception is not handled. Just add all inlined exception branches to the End node. Third: there is no Exception edge at all. Handle as case two. */ - if (exc_handler == 0) { + if (exc_handling == 0) { n_exc = 0; for (i = 0; i < arity; i++) { ir_node *ret; @@ -861,7 +854,7 @@ void inline_method(ir_node *call, ir_graph *called_graph) { int main_end_bl_arity; ir_node **end_preds; - /* assert(exc_handler == 1 || no exceptions. ) */ + /* assert(exc_handling == 1 || no exceptions. ) */ n_exc = 0; for (i = 0; i < arity; i++) { ir_node *ret = get_irn_n(end_bl, i); -- 2.20.1