Skip to content

Commit fc9eadf

Browse files
committed
profile LLVM cleanup insns
1 parent dc94ccc commit fc9eadf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/rustc/middle/trans/base.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,6 +1748,8 @@ fn trans_assign_op(bcx: block, ex: @ast::expr, op: ast::binop,
17481748

17491749
fn root_value(bcx: block, val: ValueRef, ty: ty::t,
17501750
scope_id: ast::node_id) {
1751+
let _icx = bcx.insn_ctxt("root_value");
1752+
17511753
if bcx.sess().trace() {
17521754
trans_trace(
17531755
bcx, none,
@@ -2642,6 +2644,7 @@ fn trans_lval(cx: block, e: @ast::expr) -> lval_result {
26422644
scope_id]);
26432645
}
26442646

2647+
let _icx = lv.bcx.insn_ctxt("root_value_lval");
26452648
let ty = expr_ty(lv.bcx, e);
26462649
let root_loc = alloca_zeroed(lv.bcx, type_of(cx.ccx(), ty));
26472650
let bcx = store_temp_expr(lv.bcx, INIT, root_loc, lv, ty, false);
@@ -3511,6 +3514,7 @@ fn trans_expr(bcx: block, e: @ast::expr, dest: dest) -> block {
35113514
scope_id]);
35123515
}
35133516

3517+
let _icx = bcx.insn_ctxt("root_value_expr");
35143518
add_root_cleanup(bcx, scope_id, root_loc, ty);
35153519
let lv = {bcx: bcx, val: root_loc, kind: owned};
35163520
lval_result_to_dps(lv, ty, false, dest)

0 commit comments

Comments
 (0)