aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/beam_ssa_dead.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2019-01-30 07:52:18 +0100
committerBjörn Gustavsson <[email protected]>2019-02-01 12:44:32 +0100
commite713179951d64d85450494d100caf0495ba9e104 (patch)
treee4f9e5ad90974418e83a2bbd0497a1bef421b4b9 /lib/compiler/src/beam_ssa_dead.erl
parent855af19300720a8d0dbb588a4c145ad5ffe1453e (diff)
downloadotp-e713179951d64d85450494d100caf0495ba9e104.tar.gz
otp-e713179951d64d85450494d100caf0495ba9e104.tar.bz2
otp-e713179951d64d85450494d100caf0495ba9e104.zip
Prefer map syntax and guard BIFs over the maps modules
Avoiding calls usually reduces the size of the stack frame and reduces register shuffling.
Diffstat (limited to 'lib/compiler/src/beam_ssa_dead.erl')
-rw-r--r--lib/compiler/src/beam_ssa_dead.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/compiler/src/beam_ssa_dead.erl b/lib/compiler/src/beam_ssa_dead.erl
index db82aaa8e6..57b16883ed 100644
--- a/lib/compiler/src/beam_ssa_dead.erl
+++ b/lib/compiler/src/beam_ssa_dead.erl
@@ -375,7 +375,7 @@ is_forbidden(L, St) ->
%% any instruction with potential side effects.
eval_is([#b_set{op=phi,dst=Dst,args=Args}|Is], Bs0, St) ->
- From = maps:get(from, Bs0),
+ From = map_get(from, Bs0),
[Val] = [Val || {Val,Pred} <- Args, Pred =:= From],
Bs = bind_var(Dst, Val, Bs0),
eval_is(Is, Bs, St);
@@ -826,7 +826,7 @@ combine_eqs_1([L|Ls], #st{bs=Blocks0}=St0) ->
%% Everything OK! Combine the lists.
Sw0 = #b_switch{arg=Arg,fail=Fail,list=List},
Sw = beam_ssa:normalize(Sw0),
- Blk0 = maps:get(L, Blocks0),
+ Blk0 = map_get(L, Blocks0),
Blk = Blk0#b_blk{last=Sw},
Blocks = Blocks0#{L:=Blk},
St = St0#st{bs=Blocks},
@@ -851,7 +851,7 @@ comb_get_sw(L, Blocks) ->
comb_get_sw(L, true, Blocks).
comb_get_sw(L, Safe0, #st{bs=Blocks,skippable=Skippable}) ->
- #b_blk{is=Is,last=Last} = maps:get(L, Blocks),
+ #b_blk{is=Is,last=Last} = map_get(L, Blocks),
Safe1 = Safe0 andalso is_map_key(L, Skippable),
case Last of
#b_ret{} ->