diff options
author | Björn Gustavsson <[email protected]> | 2017-12-11 21:59:39 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2017-12-15 12:31:29 +0100 |
commit | cd708cf3cd5ea4402ea8cec2d9570506b7bf8e92 (patch) | |
tree | 04e1b90598a573867168e5db32e87ddce52274d0 /lib/eunit/test/eunit.cover | |
parent | 3d90ab4a134e5898e6f35c71c3076656f5860677 (diff) | |
download | otp-cd708cf3cd5ea4402ea8cec2d9570506b7bf8e92.tar.gz otp-cd708cf3cd5ea4402ea8cec2d9570506b7bf8e92.tar.bz2 otp-cd708cf3cd5ea4402ea8cec2d9570506b7bf8e92.zip |
beam_record: Try harder to avoid fetching the tag element
When rewriting tuple matching of the first element of a tuple to an
is_tagged_tuple instruction, the get_tuple_element instruction that
fetches the tag will be left unless the register that is fetched is
subsequently killed.
We can do better than that. If the register is referenced in an
allocating instruction, but its value is never actually used, we
can do one of two things: if the value is known to be defined earlier
(using annotations added by beam_utils:anno_defs/1) the instruction
can be removed altogether; if not, it can be replaced with a
'move nil TagRegister' instruction.
Diffstat (limited to 'lib/eunit/test/eunit.cover')
0 files changed, 0 insertions, 0 deletions