aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-01-12 10:58:17 +0100
committerBjörn-Egil Dahlberg <[email protected]>2015-01-12 11:00:19 +0100
commitb8c54891547dbdea1d2aa03973df24e4d9e4e816 (patch)
treec58b30eb6439a68c4871d77a1ad19689dc39c49f /lib/compiler
parent3137b3871e3919ab4bdb02dd1fc16c3cb7a77870 (diff)
downloadotp-b8c54891547dbdea1d2aa03973df24e4d9e4e816.tar.gz
otp-b8c54891547dbdea1d2aa03973df24e4d9e4e816.tar.bz2
otp-b8c54891547dbdea1d2aa03973df24e4d9e4e816.zip
compiler: Remove get_map_elements label check in blocks
The get_map_elements instruction has been removed from all blocks by the mandatory beam_split pass and thus only needs handling by the outer loop.
Diffstat (limited to 'lib/compiler')
-rw-r--r--lib/compiler/src/beam_jump.erl5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/compiler/src/beam_jump.erl b/lib/compiler/src/beam_jump.erl
index b952139f2c..4e699c4fbf 100644
--- a/lib/compiler/src/beam_jump.erl
+++ b/lib/compiler/src/beam_jump.erl
@@ -435,14 +435,14 @@ is_label_used_in(Lbl, Is) ->
is_label_used_in_1(Is, Lbl, gb_sets:empty()).
is_label_used_in_1([{block,Block}|Is], Lbl, Empty) ->
- lists:any(fun(I) -> is_label_used_in_2(I, Lbl) end, Block)
+ lists:any(fun(I) -> is_label_used_in_block(I, Lbl) end, Block)
orelse is_label_used_in_1(Is, Lbl, Empty);
is_label_used_in_1([I|Is], Lbl, Empty) ->
Used = ulbl(I, Empty),
gb_sets:is_member(Lbl, Used) orelse is_label_used_in_1(Is, Lbl, Empty);
is_label_used_in_1([], _, _) -> false.
-is_label_used_in_2({set,_,_,Info}, Lbl) ->
+is_label_used_in_block({set,_,_,Info}, Lbl) ->
case Info of
{bif,_,{f,F}} -> F =:= Lbl;
{alloc,_,{gc_bif,_,{f,F}}} -> F =:= Lbl;
@@ -452,7 +452,6 @@ is_label_used_in_2({set,_,_,Info}, Lbl) ->
{put_tuple,_} -> false;
{get_tuple_element,_} -> false;
{set_tuple_element,_} -> false;
- {get_map_elements,{f,F}} -> F =:= Lbl;
{line,_} -> false;
_ when is_atom(Info) -> false
end.