aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/beam_utils.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-01-13 10:39:44 +0100
committerBjörn Gustavsson <[email protected]>2015-01-21 10:01:21 +0100
commitc03889dcbce713c4dbf70b9415aeb7f0b904929c (patch)
tree242b9325e324b809a3442db1f38528a947b0ee81 /lib/compiler/src/beam_utils.erl
parent266cb7db1e78cdfdda87d2fa954ce229228dcb73 (diff)
downloadotp-c03889dcbce713c4dbf70b9415aeb7f0b904929c.tar.gz
otp-c03889dcbce713c4dbf70b9415aeb7f0b904929c.tar.bz2
otp-c03889dcbce713c4dbf70b9415aeb7f0b904929c.zip
beam_utils: Remove unreachable clauses in live_opt/4
beam_utils:live_opt() is only invoked on code that has been blockified by beam_block. Therefore the allocate/3 and allocate_heap/4 instructions only occur in their transformed form inside a block. While we are it, correct a comment. 'asm' has been replaced by 'from_asm'.
Diffstat (limited to 'lib/compiler/src/beam_utils.erl')
-rw-r--r--lib/compiler/src/beam_utils.erl6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/compiler/src/beam_utils.erl b/lib/compiler/src/beam_utils.erl
index e82ba82d38..84a2b782e9 100644
--- a/lib/compiler/src/beam_utils.erl
+++ b/lib/compiler/src/beam_utils.erl
@@ -758,13 +758,9 @@ live_opt([{line,_}=I|Is], Regs, D, Acc) ->
live_opt(Is, Regs, D, [I|Acc]);
%% The following instructions can occur if the "compilation" has been
-%% started from a .S file using the 'asm' option.
+%% started from a .S file using the 'from_asm' option.
live_opt([{trim,_,_}=I|Is], Regs, D, Acc) ->
live_opt(Is, Regs, D, [I|Acc]);
-live_opt([{allocate,_,Live}=I|Is], _, D, Acc) ->
- live_opt(Is, live_call(Live), D, [I|Acc]);
-live_opt([{allocate_heap,_,_,Live}=I|Is], _, D, Acc) ->
- live_opt(Is, live_call(Live), D, [I|Acc]);
live_opt([{'%',_}=I|Is], Regs, D, Acc) ->
live_opt(Is, Regs, D, [I|Acc]);
live_opt([{recv_set,_}=I|Is], Regs, D, Acc) ->