Commit 573e6cf8 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

amd64, ia32: Remove CopyKeep from function prologue.

These are remnants from back when the prologue was added early and scheduling was not done, yet.
They were there to help the scheduler not to move an IncSP before the copy from sp to bp and thus having two values in sp live at the same time.
parent db6213aa
......@@ -592,13 +592,9 @@ static void introduce_prologue(ir_graph *const irg)
sched_add_after(push, curr_bp);
be_set_constr_single_reg_out(curr_bp, 0,
bp, arch_register_req_type_ignore);
curr_sp = be_new_CopyKeep_single(block, curr_sp, curr_bp);
sched_add_after(curr_bp, curr_sp);
be_set_constr_single_reg_out(curr_sp, 0,
sp, arch_register_req_type_produces_sp);
ir_node *incsp = amd64_new_IncSP(block, curr_sp, frame_size, 0);
sched_add_after(curr_sp, incsp);
sched_add_after(curr_bp, incsp);
/* make sure the initial IncSP is really used by someone */
be_keep_if_unused(incsp);
......
......@@ -1077,14 +1077,11 @@ static void introduce_prologue(ir_graph *const irg)
ir_node *const curr_bp = be_new_Copy(block, curr_sp);
sched_add_after(push, curr_bp);
be_set_constr_single_reg_out(curr_bp, 0, bp, arch_register_req_type_ignore);
curr_sp = be_new_CopyKeep_single(block, curr_sp, curr_bp);
sched_add_after(curr_bp, curr_sp);
be_set_constr_single_reg_out(curr_sp, 0, sp, arch_register_req_type_produces_sp);
edges_reroute_except(initial_bp, curr_bp, push);
ir_node *incsp = ia32_new_IncSP(block, curr_sp, frame_size, 0);
edges_reroute_except(initial_sp, incsp, push);
sched_add_after(curr_sp, incsp);
sched_add_after(curr_bp, incsp);
/* make sure the initial IncSP is really used by someone */
be_keep_if_unused(incsp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment