Skip to content

Commit d721c1f

Browse files
committed
trans: Reorder basic blocks in slice_for_each
This is mainly for readability of the generated LLVM IR and subsequently assembly. There is a slight positive performance impact, likely due to I-cache effects.
1 parent bad58f2 commit d721c1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_trans/tvec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ pub fn slice_for_each<'a, 'tcx, F>(
3030
};
3131

3232
let body_bcx = bcx.build_sibling_block("slice_loop_body");
33-
let next_bcx = bcx.build_sibling_block("slice_loop_next");
3433
let header_bcx = bcx.build_sibling_block("slice_loop_header");
34+
let next_bcx = bcx.build_sibling_block("slice_loop_next");
3535

3636
let start = if zst {
3737
C_uint(bcx.ccx, 0usize)

0 commit comments

Comments
 (0)