Skip to content

Commit c9b0d51

Browse files
authored
Merge pull request rust-lang#1080 from mbrubeck/deps
Update to hashbrown 0.9
2 parents 3b0f3a0 + bd2313f commit c9b0d51

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ byteorder = "1.2.7"
2323
indexmap = "1.0.2"
2424
cfg-if = "0.1.10"
2525
libloading = { version = "0.6.0", optional = true }
26-
hashbrown = "0.8.1"
26+
hashbrown = "0.9.0"
2727

2828
# Uncomment to use local checkout of cranelift
2929
#[patch."https://github.com/bytecodealliance/wasmtime/"]

src/optimize/stack2reg.rs

+4-7
Original file line numberDiff line numberDiff line change
@@ -389,27 +389,24 @@ fn remove_unused_stack_addr_and_stack_load(opt_ctx: &mut OptimizeContext<'_>) {
389389
// Replace all unused stack_addr and stack_load instructions with nop.
390390
let mut func = &mut opt_ctx.ctx.func;
391391

392-
// drain_filter() on hashbrown::HashSet drains the items that do *not* match the
393-
// predicate. Once hashbrown gets updated to match the behaviour of std::drain_filter
394-
// (0.8.2), the predicate will have to be reversed
395392
for stack_slot_users in opt_ctx.stack_slot_usage_map.values_mut() {
396393
stack_slot_users
397394
.stack_addr
398395
.drain_filter(|inst| {
399-
!(stack_addr_load_insts_users
396+
stack_addr_load_insts_users
400397
.get(inst)
401398
.map(|users| users.is_empty())
402-
.unwrap_or(true))
399+
.unwrap_or(true)
403400
})
404401
.for_each(|inst| StackSlotUsage::remove_unused_stack_addr(&mut func, inst));
405402

406403
stack_slot_users
407404
.stack_load
408405
.drain_filter(|inst| {
409-
!(stack_addr_load_insts_users
406+
stack_addr_load_insts_users
410407
.get(inst)
411408
.map(|users| users.is_empty())
412-
.unwrap_or(true))
409+
.unwrap_or(true)
413410
})
414411
.for_each(|inst| StackSlotUsage::remove_unused_load(&mut func, inst));
415412
}

0 commit comments

Comments
 (0)