diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2021-03-05 19:12:59 +0100 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2021-03-05 19:12:59 +0100 |
| commit | 7a6ea77473949c9a74712c09e7a2654e0ba8258b (patch) | |
| tree | adbb6c4264e9bd3e28f196a5e66664a22c6c1ea7 /compiler/rustc_codegen_cranelift/src/optimize/code_layout.rs | |
| parent | 8fd946c63a6c3aae9788bd459d278cb2efa77099 (diff) | |
| parent | 9a0c32934ebe376128230aa8da3275697b2053e7 (diff) | |
| download | rust-7a6ea77473949c9a74712c09e7a2654e0ba8258b.tar.gz rust-7a6ea77473949c9a74712c09e7a2654e0ba8258b.zip | |
Merge commit '9a0c32934ebe376128230aa8da3275697b2053e7' into sync_cg_clif-2021-03-05
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/optimize/code_layout.rs')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/optimize/code_layout.rs | 10 |
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); |
