Commit d7f28dfa authored by Christoph Mallon's avatar Christoph Mallon
Browse files

be: Use sched_add_before(a, b) instead of sched_add_after(sched_prev(a), b).

parent 21226ca7
......@@ -149,10 +149,8 @@ static void transform_Reload(ir_node *node)
ir_node *proj;
ir_node *load;
ir_node *sched_point = sched_prev(node);
load = new_bd_amd64_Load(dbgi, block, ptr, mem, entity);
sched_add_after(sched_point, load);
sched_add_before(node, load);
sched_remove(node);
proj = new_rd_Proj(dbgi, load, mode, pn_amd64_Load_res);
......@@ -173,14 +171,11 @@ static void transform_Spill(ir_node *node)
ir_node *val = get_irn_n(node, n_be_Spill_val);
//ir_mode *mode = get_irn_mode(val);
ir_entity *entity = be_get_frame_entity(node);
ir_node *sched_point;
ir_node *store;
sched_point = sched_prev(node);
store = new_bd_amd64_Store(dbgi, block, ptr, val, mem, entity);
sched_add_before(node, store);
sched_remove(node);
sched_add_after(sched_point, store);
exchange(node, store);
}
......
......@@ -191,10 +191,8 @@ static void transform_Reload(ir_node *node)
ir_node *proj;
ir_node *load;
ir_node *sched_point = sched_prev(node);
load = new_bd_arm_Ldr(dbgi, block, ptr, mem, mode, entity, false, 0, true);
sched_add_after(sched_point, load);
sched_add_before(node, load);
sched_remove(node);
proj = new_rd_Proj(dbgi, load, mode, pn_arm_Ldr_res);
......@@ -215,15 +213,12 @@ static void transform_Spill(ir_node *node)
ir_node *val = get_irn_n(node, n_be_Spill_val);
ir_mode *mode = get_irn_mode(val);
ir_entity *entity = be_get_frame_entity(node);
ir_node *sched_point;
ir_node *store;
sched_point = sched_prev(node);
store = new_bd_arm_Str(dbgi, block, ptr, val, mem, mode, entity, false, 0,
true);
sched_add_before(node, store);
sched_remove(node);
sched_add_after(sched_point, store);
exchange(node, store);
}
......
......@@ -675,8 +675,6 @@ static void transform_to_Load(ir_node *node)
ir_node *new_op, *proj;
const arch_register_t *reg;
ir_node *const sched_point = sched_prev(node);
if (mode_is_float(spillmode)) {
if (ia32_cg_config.use_sse2)
new_op = new_bd_ia32_xLoad(dbgi, block, ptr, noreg, mem, spillmode);
......@@ -700,7 +698,7 @@ static void transform_to_Load(ir_node *node)
proj = new_rd_Proj(dbgi, new_op, mode, pn_ia32_Load_res);
sched_add_after(sched_point, new_op);
sched_add_before(node, new_op);
sched_remove(node);
/* copy the register from the old node to the new Load */
......@@ -730,8 +728,6 @@ static void transform_to_Store(ir_node *node)
ir_node *res;
ir_node *store;
ir_node *const sched_point = sched_prev(node);
if (mode_is_float(mode)) {
if (ia32_cg_config.use_sse2) {
store = new_bd_ia32_xStore(dbgi, block, ptr, noreg, nomem, val);
......@@ -760,7 +756,7 @@ static void transform_to_Store(ir_node *node)
SET_IA32_ORIG_NODE(store, node);
DBG_OPT_SPILL2ST(node, store);
sched_add_after(sched_point, store);
sched_add_before(node, store);
sched_remove(node);
exchange(node, res);
......
Supports Markdown
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