diff options
author | Björn Gustavsson <[email protected]> | 2011-04-06 10:57:15 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2011-04-12 05:52:57 +0200 |
commit | ce34176deaffd219e921cb70f271bbc693061fb6 (patch) | |
tree | 405880d7952e3e359add6ff5cb83353627204490 | |
parent | c30b5cb6ada1fd119356f54c90a2f660d5f08c1d (diff) | |
download | otp-ce34176deaffd219e921cb70f271bbc693061fb6.tar.gz otp-ce34176deaffd219e921cb70f271bbc693061fb6.tar.bz2 otp-ce34176deaffd219e921cb70f271bbc693061fb6.zip |
beam_dead: Remove uncoverable case clause in update_value_dict/3
Because the code generator (v3_codegen) would not include the
same value more than once in a select_val/3 instruction and
because a label can only be referenced by one select_val/3
instruction, there is no way that the correct value could already
be in the gb_tree. (Even if it could happen, this change is
safe because only opportunity for an optimization would be missed;
incorrect code would not be generated.)
-rw-r--r-- | lib/compiler/src/beam_dead.erl | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/compiler/src/beam_dead.erl b/lib/compiler/src/beam_dead.erl index 135c7757c5..0afb027d3a 100644 --- a/lib/compiler/src/beam_dead.erl +++ b/lib/compiler/src/beam_dead.erl @@ -293,7 +293,6 @@ update_value_dict([Lit,{f,Lbl}|T], Reg, D0) -> Key = {Lbl,Reg}, D = case gb_trees:lookup(Key, D0) of none -> gb_trees:insert(Key, Lit, D0); %New. - {value,Lit} -> D0; %Already correct. {value,inconsistent} -> D0; %Inconsistent. {value,_} -> gb_trees:update(Key, inconsistent, D0) end, |