aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-04-11 12:15:09 +0200
committerBjörn Gustavsson <[email protected]>2011-04-12 05:52:58 +0200
commit981acf6eaa48adffb27b2e812db8bcd180121f4e (patch)
tree047b0d679ce69e26d933d35252393e06247c10f3 /lib/compiler
parentce34176deaffd219e921cb70f271bbc693061fb6 (diff)
downloadotp-981acf6eaa48adffb27b2e812db8bcd180121f4e.tar.gz
otp-981acf6eaa48adffb27b2e812db8bcd180121f4e.tar.bz2
otp-981acf6eaa48adffb27b2e812db8bcd180121f4e.zip
beam_dead: Remove uncovered clauses in binary matching optimization
In the optimization of binary matching, it seems that two clauses cannot never be reached. Removing the clauses is safe, since that would only mean that an opportunity for an optimization is lost
Diffstat (limited to 'lib/compiler')
-rw-r--r--lib/compiler/src/beam_dead.erl5
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/compiler/src/beam_dead.erl b/lib/compiler/src/beam_dead.erl
index 0afb027d3a..73f45452fa 100644
--- a/lib/compiler/src/beam_dead.erl
+++ b/lib/compiler/src/beam_dead.erl
@@ -592,16 +592,11 @@ count_bits_matched([{test,_,_,_}|Is], SavePoint, Bits) ->
count_bits_matched([{bs_save2,Reg,SavePoint}|_], {Reg,SavePoint}, Bits) ->
%% The save point we are looking for - we are done.
Bits;
-count_bits_matched([{bs_save2,_,_}|Is], SavePoint, Bits) ->
- %% Another save point - keep counting.
- count_bits_matched(Is, SavePoint, Bits);
count_bits_matched([_|_], _, Bits) -> Bits.
shortcut_bs_pos_used(To, Reg, D) ->
shortcut_bs_pos_used_1(beam_utils:code_at(To, D), Reg, D).
-shortcut_bs_pos_used_1([{bs_restore2,Reg,_}|_], Reg, _) ->
- false;
shortcut_bs_pos_used_1([{bs_context_to_binary,Reg}|_], Reg, _) ->
false;
shortcut_bs_pos_used_1(Is, Reg, D) ->