Commit 1ae6d18b authored by Christoph Mallon's avatar Christoph Mallon
Browse files

amd64, arm, sparc: Replace the dependency edge of the IncSP after the Call by...

amd64, arm, sparc: Replace the dependency edge of the IncSP after the Call by a stack output of the call.

This removes the only uses of dependency edges.
parent fe638137
......@@ -474,7 +474,7 @@ call => {
state => "exc_pinned",
in_reqs => "...",
out_reqs => "...",
outs => [ "M", "flags", "first_result" ],
outs => [ "M", "stack", "flags", "first_result" ],
attr_type => "amd64_addr_attr_t",
attr => "amd64_op_mode_t op_mode, amd64_addr_t addr",
fixed => "amd64_insn_mode_t insn_mode = INSN_MODE_64;\n",
......
......@@ -1865,6 +1865,7 @@ static ir_node *gen_Call(ir_node *node)
/* create output register reqs */
arch_set_irn_register_req_out(call, pn_amd64_call_M, arch_no_register_req);
arch_copy_irn_out_info(call, pn_amd64_call_stack, incsp);
arch_register_class_t const *const flags = &amd64_reg_classes[CLASS_amd64_flags];
arch_set_irn_register_req_out(call, pn_amd64_call_flags, flags->class_req);
......@@ -1892,11 +1893,11 @@ static ir_node *gen_Call(ir_node *node)
set_irn_pinned(call, get_irn_pinned(node));
/* IncSP to destroy the call stackframe */
incsp = amd64_new_IncSP(new_block, incsp, -cconv->param_stack_size, 0);
ir_node *const call_stack = new_r_Proj(call, mode_gp, pn_amd64_call_stack);
incsp = amd64_new_IncSP(new_block, call_stack, -cconv->param_stack_size, 0);
/* if we are the last IncSP producer in a block then we have to keep
* the stack value.
* Note: This here keeps all producers which is more than necessary */
add_irn_dep(incsp, call);
keep_alive(incsp);
pmap_insert(node_to_stack, node, incsp);
......
......@@ -445,7 +445,7 @@ Bl => {
irn_flags => [ "modify_flags" ],
in_reqs => "...",
out_reqs => "...",
outs => [ "M", "first_result" ],
outs => [ "M", "stack", "first_result" ],
attr_type => "arm_Address_attr_t",
attr => "ir_entity *entity, int offset",
emit => 'bl %I',
......
......@@ -2025,6 +2025,8 @@ static ir_node *gen_Call(ir_node *node)
/* create output register reqs */
arch_set_irn_register_req_out(res, pn_arm_Bl_M, arch_no_register_req);
arch_copy_irn_out_info(res, pn_arm_Bl_stack, incsp);
for (size_t o = 0; o < n_caller_saves; ++o) {
const arch_register_t *reg = caller_saves[o];
arch_set_irn_register_req_out(res, pn_arm_Bl_first_result + o, reg->single_req);
......@@ -2034,11 +2036,11 @@ static ir_node *gen_Call(ir_node *node)
set_irn_pinned(res, get_irn_pinned(node));
/* IncSP to destroy the call stackframe */
incsp = be_new_IncSP(sp_reg, new_block, incsp, -cconv->param_stack_size, 0);
ir_node *const call_stack = new_r_Proj(res, arm_mode_gp, pn_arm_Bl_stack);
incsp = be_new_IncSP(sp_reg, new_block, call_stack, -cconv->param_stack_size, 0);
/* if we are the last IncSP producer in a block then we have to keep
* the stack value.
* Note: This here keeps all producers which is more than necessary */
add_irn_dep(incsp, res);
keep_alive(incsp);
pmap_insert(node_to_stack, node, incsp);
......
......@@ -556,7 +556,7 @@ Call => {
state => "exc_pinned",
in_reqs => "...",
out_reqs => "...",
outs => [ "M", "first_result" ],
outs => [ "M", "stack", "first_result" ],
attr_type => "sparc_call_attr_t",
constructors => {
imm => {
......
......@@ -2137,6 +2137,8 @@ static ir_node *gen_Call(ir_node *node)
/* create output register reqs */
arch_set_irn_register_req_out(res, pn_sparc_Call_M, arch_no_register_req);
arch_copy_irn_out_info(res, pn_sparc_Call_stack, incsp);
/* add register requirements for the result regs */
for (size_t r = 0; r < n_ress; ++r) {
const reg_or_stackslot_t *result_info = &cconv->results[r];
......@@ -2163,11 +2165,11 @@ static ir_node *gen_Call(ir_node *node)
set_irn_pinned(res, get_irn_pinned(node));
/* IncSP to destroy the call stackframe */
incsp = be_new_IncSP(sp_reg, new_block, incsp, -cconv->param_stack_size, 0);
ir_node *const call_stack = new_r_Proj(res, mode_gp, pn_sparc_Call_stack);
incsp = be_new_IncSP(sp_reg, new_block, call_stack, -cconv->param_stack_size, 0);
/* if we are the last IncSP producer in a block then we have to keep
* the stack value.
* Note: This here keeps all producers which is more than necessary */
add_irn_dep(incsp, res);
keep_alive(incsp);
pmap_insert(node_to_stack, node, 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