summaryrefslogtreecommitdiffhomepage
path: root/ir/lower
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2016-08-05 22:21:55 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2016-08-05 22:41:07 +0200
commit969078bf86fa8b9589492c310ea21de7968d87ec (patch)
treeb8ac898dfb54c01d0c989743dcd910a1206f3465 /ir/lower
parente606a37dee29d9dbab53967ccd65c1066e44f31b (diff)
Copy the debug info when creating and lowering CopyBs.
Diffstat (limited to 'ir/lower')
-rw-r--r--ir/lower/lower_calls.c7
-rw-r--r--ir/lower/lower_copyb.c6
2 files changed, 7 insertions, 6 deletions
diff --git a/ir/lower/lower_calls.c b/ir/lower/lower_calls.c
index 1a9173a..735027a 100644
--- a/ir/lower/lower_calls.c
+++ b/ir/lower/lower_calls.c
@@ -836,9 +836,10 @@ static void transform_return(ir_node *ret, size_t n_ret_com, wlk_env *env)
++n_cr_opt;
} else {
/* copy-return optimization is impossible, do the copy. */
- bool is_volatile = is_partly_volatile(pred);
- mem = new_r_CopyB(block, mem, arg, pred, type,
- is_volatile ? cons_volatile : cons_none);
+ bool const is_volatile = is_partly_volatile(pred);
+ dbg_info *const dbgi = get_irn_dbg_info(ret);
+ ir_cons_flags const cons = is_volatile ? cons_volatile : cons_none;
+ mem = new_rd_CopyB(dbgi, block, mem, arg, pred, type, cons);
}
}
/* replace the in of the Return */
diff --git a/ir/lower/lower_copyb.c b/ir/lower/lower_copyb.c
index 8ec3159..8b91b61 100644
--- a/ir/lower/lower_copyb.c
+++ b/ir/lower/lower_copyb.c
@@ -50,6 +50,7 @@ static ir_mode *get_ir_mode(unsigned mode_bytes)
static void lower_small_copyb_node(ir_node *irn)
{
ir_graph *irg = get_irn_irg(irn);
+ dbg_info *dbgi = get_irn_dbg_info(irn);
ir_node *block = get_nodes_block(irn);
ir_type *tp = get_CopyB_type(irn);
ir_node *addr_src = get_CopyB_src(irn);
@@ -72,15 +73,14 @@ static void lower_small_copyb_node(ir_node *irn)
ir_node *addr_const = new_r_Const_long(irg, mode_ref_int, offset);
ir_node *add = new_r_Add(block, addr_src, addr_const);
- ir_node *load = new_r_Load(block, mem, add, mode, tp, flags);
+ ir_node *load = new_rd_Load(dbgi, block, mem, add, mode, tp, flags);
ir_node *load_res = new_r_Proj(load, mode, pn_Load_res);
ir_node *load_mem = new_r_Proj(load, mode_M, pn_Load_M);
ir_node *addr_const2 = new_r_Const_long(irg, mode_ref_int, offset);
ir_node *add2 = new_r_Add(block, addr_dst, addr_const2);
- ir_node *store = new_r_Store(block, load_mem, add2, load_res,
- tp, flags);
+ ir_node *store = new_rd_Store(dbgi, block, load_mem, add2, load_res, tp, flags);
ir_node *store_mem = new_r_Proj(store, mode_M, pn_Store_M);
mem = store_mem;