aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2019-01-30 06:25:41 +0100
committerBjörn Gustavsson <[email protected]>2019-02-01 12:44:32 +0100
commit7306c730fa3ce28ec47c31ab307e0d3d0105677a (patch)
tree5f35344a20cc22b31ca5421b66e98f533f95f6e1 /lib
parentc86c4dd18da287e439770c47fa384d438c134f12 (diff)
downloadotp-7306c730fa3ce28ec47c31ab307e0d3d0105677a.tar.gz
otp-7306c730fa3ce28ec47c31ab307e0d3d0105677a.tar.bz2
otp-7306c730fa3ce28ec47c31ab307e0d3d0105677a.zip
Use gb_sets:delete/2 instead of gb_sets:delete_any/2
Save a little time by using gb_sets:delete/2 instead of gb_sets:delete_any/2 when the key is known to be in the set.
Diffstat (limited to 'lib')
-rw-r--r--lib/compiler/src/beam_ssa_opt.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compiler/src/beam_ssa_opt.erl b/lib/compiler/src/beam_ssa_opt.erl
index 47b9ef28d8..70676de6fe 100644
--- a/lib/compiler/src/beam_ssa_opt.erl
+++ b/lib/compiler/src/beam_ssa_opt.erl
@@ -1218,7 +1218,7 @@ live_opt_is([#b_set{op=succeeded,dst=SuccDst=SuccDstVar,
case gb_sets:is_member(SuccDst, Live0) of
true ->
Live1 = gb_sets:add(Dst, Live0),
- Live = gb_sets:delete_any(SuccDst, Live1),
+ Live = gb_sets:delete(SuccDst, Live1),
live_opt_is([I|Is], Live, [SuccI|Acc]);
false ->
live_opt_is([I|Is], Live0, Acc)
@@ -1229,7 +1229,7 @@ live_opt_is([#b_set{dst=Dst}=I|Is], Live0, Acc) ->
case gb_sets:is_member(Dst, Live0) of
true ->
Live1 = gb_sets:union(Live0, gb_sets:from_ordset(beam_ssa:used(I))),
- Live = gb_sets:delete_any(Dst, Live1),
+ Live = gb_sets:delete(Dst, Live1),
live_opt_is(Is, Live, [I|Acc]);
false ->
case beam_ssa:no_side_effect(I) of