about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Zeitz <florob@babelmonkeys.de>2017-07-26 16:23:07 +0200
committerFlorian Zeitz <florob@babelmonkeys.de>2017-07-26 16:23:07 +0200
commitd721c1f9e3caf1f4a0e0afb0151ec127d4fd2771 (patch)
tree3a795d80c7e6199f45ce2f698729d539410bba1d
parentbad58f27916e7e233cc2916dcc9167708077e792 (diff)
downloadrust-d721c1f9e3caf1f4a0e0afb0151ec127d4fd2771.tar.gz
rust-d721c1f9e3caf1f4a0e0afb0151ec127d4fd2771.zip
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.
-rw-r--r--src/librustc_trans/tvec.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_trans/tvec.rs b/src/librustc_trans/tvec.rs
index 4216a73a8dd..de4d217c735 100644
--- a/src/librustc_trans/tvec.rs
+++ b/src/librustc_trans/tvec.rs
@@ -30,8 +30,8 @@ pub fn slice_for_each<'a, 'tcx, F>(
     };
 
     let body_bcx = bcx.build_sibling_block("slice_loop_body");
-    let next_bcx = bcx.build_sibling_block("slice_loop_next");
     let header_bcx = bcx.build_sibling_block("slice_loop_header");
+    let next_bcx = bcx.build_sibling_block("slice_loop_next");
 
     let start = if zst {
         C_uint(bcx.ccx, 0usize)