From: Matthias Braun Date: Tue, 23 Aug 2011 11:22:40 +0000 (+0200) Subject: ia32: make sure the stackframe IncSp is always used X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=291696bb30d5430ed99ae56e09f944baf0684269;p=libfirm ia32: make sure the stackframe IncSp is always used --- diff --git a/ir/be/ia32/bearch_ia32.c b/ir/be/ia32/bearch_ia32.c index ae5cf8e78..030b6af31 100644 --- a/ir/be/ia32/bearch_ia32.c +++ b/ir/be/ia32/bearch_ia32.c @@ -1292,6 +1292,13 @@ static void introduce_prolog_epilog(ir_graph *irg) set_irn_n(push, n_ia32_Push_stack, initial_sp); sched_add_after(curr_sp, incsp); + /* make sure the initial IncSP is really used by someone */ + if (get_irn_n_edges(incsp) <= 1) { + ir_node *in[] = { incsp }; + ir_node *keep = be_new_Keep(block, 1, in); + sched_add_after(incsp, keep); + } + layout->initial_bias = -4; } else { ir_node *incsp = be_new_IncSP(sp, block, curr_sp, frame_size, 0);