aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/beam_peep.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-04-18 10:22:29 +0200
committerBjörn Gustavsson <[email protected]>2016-04-18 10:22:29 +0200
commit1f365d733604afd27e48afff80071cf2c67e1091 (patch)
tree62163cea4dcef7cd97074493a1fc867c495390b9 /lib/compiler/src/beam_peep.erl
parent3a0aa160f5f13857d7335c3f3524bd0a59250cc4 (diff)
parentc74f998b9ad46785aaa2557a4033c056574dc937 (diff)
downloadotp-1f365d733604afd27e48afff80071cf2c67e1091.tar.gz
otp-1f365d733604afd27e48afff80071cf2c67e1091.tar.bz2
otp-1f365d733604afd27e48afff80071cf2c67e1091.zip
Merge branch 'bjorn/compiler/misc-opt'
* bjorn/compiler/misc-opt: v3_kernel: Construct literal lists properly Use the register map in %live in beam_utils:is_killed_block/2 Teach beam_utils to check liveness for put_map instructions beam_peep: Help out beam_jump
Diffstat (limited to 'lib/compiler/src/beam_peep.erl')
-rw-r--r--lib/compiler/src/beam_peep.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/compiler/src/beam_peep.erl b/lib/compiler/src/beam_peep.erl
index 1e430b4ed5..c8bef31824 100644
--- a/lib/compiler/src/beam_peep.erl
+++ b/lib/compiler/src/beam_peep.erl
@@ -83,6 +83,9 @@ peep([{gc_bif,_,_,_,_,Dst}=I|Is], SeenTests0, Acc) ->
%% Kill all remembered tests that depend on the destination register.
SeenTests = kill_seen(Dst, SeenTests0),
peep(Is, SeenTests, [I|Acc]);
+peep([{jump,{f,L}},{label,L}=I|Is], _, Acc) ->
+ %% Sometimes beam_jump has missed this optimization.
+ peep(Is, gb_sets:empty(), [I|Acc]);
peep([{select,Op,R,F,Vls0}|Is], _, Acc) ->
case prune_redundant_values(Vls0, F) of
[] ->