about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/optimize/code_layout.rs
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2021-03-07 10:41:19 +0900
committerGitHub <noreply@github.com>2021-03-07 10:41:19 +0900
commitb6191d7c6625db312286f94391cc7d4d6d62d390 (patch)
tree876aa3d9de5625afd48043c3c7c5faf58e0e4612 /compiler/rustc_codegen_cranelift/src/optimize/code_layout.rs
parent379679b913410e1bada4e754fde6e2799664fc91 (diff)
parent7a6ea77473949c9a74712c09e7a2654e0ba8258b (diff)
downloadrust-b6191d7c6625db312286f94391cc7d4d6d62d390.tar.gz
rust-b6191d7c6625db312286f94391cc7d4d6d62d390.zip
Rollup merge of #82808 - bjorn3:sync_cg_clif-2021-03-05, r=bjorn3
Sync rustc_codegen_cranelift

The main highlight of this sync is removal of support for the old x86 Cranelift backend. This made it possible to use native atomic instructions rather than hackishly using a global mutex. 128bit integer support has also seen a few bugfixes and performance improvements. And finally I have formatted everything using the same rustfmt config as the rest of this repo.

r? ````@ghost````

````@rustbot```` label +A-codegen +A-cranelift +T-compiler
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/optimize/code_layout.rs')
-rw-r--r--compiler/rustc_codegen_cranelift/src/optimize/code_layout.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/optimize/code_layout.rs b/compiler/rustc_codegen_cranelift/src/optimize/code_layout.rs
index f02732014d1..ca9ff15ec10 100644
--- a/compiler/rustc_codegen_cranelift/src/optimize/code_layout.rs
+++ b/compiler/rustc_codegen_cranelift/src/optimize/code_layout.rs
@@ -15,10 +15,7 @@ pub(super) fn optimize_function(ctx: &mut Context, cold_blocks: &EntitySet<Block
     // bytecodealliance/cranelift#1339 is implemented.
 
     let mut block_insts = FxHashMap::default();
-    for block in cold_blocks
-        .keys()
-        .filter(|&block| cold_blocks.contains(block))
-    {
+    for block in cold_blocks.keys().filter(|&block| cold_blocks.contains(block)) {
         let insts = ctx.func.layout.block_insts(block).collect::<Vec<_>>();
         for &inst in &insts {
             ctx.func.layout.remove_inst(inst);
@@ -28,10 +25,7 @@ pub(super) fn optimize_function(ctx: &mut Context, cold_blocks: &EntitySet<Block
     }
 
     // And then append them at the back again.
-    for block in cold_blocks
-        .keys()
-        .filter(|&block| cold_blocks.contains(block))
-    {
+    for block in cold_blocks.keys().filter(|&block| cold_blocks.contains(block)) {
         ctx.func.layout.append_block(block);
         for inst in block_insts.remove(&block).unwrap() {
             ctx.func.layout.append_inst(inst, block);