File tree 2 files changed +5
-8
lines changed
2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ byteorder = "1.2.7"
23
23
indexmap = " 1.0.2"
24
24
cfg-if = " 0.1.10"
25
25
libloading = { version = " 0.6.0" , optional = true }
26
- hashbrown = " 0.8.1 "
26
+ hashbrown = " 0.9.0 "
27
27
28
28
# Uncomment to use local checkout of cranelift
29
29
# [patch."https://github.com/bytecodealliance/wasmtime/"]
Original file line number Diff line number Diff line change @@ -389,27 +389,24 @@ fn remove_unused_stack_addr_and_stack_load(opt_ctx: &mut OptimizeContext<'_>) {
389
389
// Replace all unused stack_addr and stack_load instructions with nop.
390
390
let mut func = & mut opt_ctx. ctx . func ;
391
391
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
395
392
for stack_slot_users in opt_ctx. stack_slot_usage_map . values_mut ( ) {
396
393
stack_slot_users
397
394
. stack_addr
398
395
. drain_filter ( |inst| {
399
- ! ( stack_addr_load_insts_users
396
+ stack_addr_load_insts_users
400
397
. get ( inst)
401
398
. map ( |users| users. is_empty ( ) )
402
- . unwrap_or ( true ) )
399
+ . unwrap_or ( true )
403
400
} )
404
401
. for_each ( |inst| StackSlotUsage :: remove_unused_stack_addr ( & mut func, inst) ) ;
405
402
406
403
stack_slot_users
407
404
. stack_load
408
405
. drain_filter ( |inst| {
409
- ! ( stack_addr_load_insts_users
406
+ stack_addr_load_insts_users
410
407
. get ( inst)
411
408
. map ( |users| users. is_empty ( ) )
412
- . unwrap_or ( true ) )
409
+ . unwrap_or ( true )
413
410
} )
414
411
. for_each ( |inst| StackSlotUsage :: remove_unused_load ( & mut func, inst) ) ;
415
412
}
You can’t perform that action at this time.
0 commit comments