aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/beam_listing.erl
diff options
context:
space:
mode:
authorMichał Muskała <[email protected]>2017-08-13 14:15:06 +0200
committerMichał Muskała <[email protected]>2017-08-14 14:22:47 +0200
commitcf95a4a8b6a0d57423a89465e950beb16c9606a1 (patch)
treeed205c0545941b5a1a0e1d21bb64210c097a87b5 /lib/compiler/src/beam_listing.erl
parentf7c9383f4c3d4b6819b5ba4d54c7093df806fe4a (diff)
downloadotp-cf95a4a8b6a0d57423a89465e950beb16c9606a1.tar.gz
otp-cf95a4a8b6a0d57423a89465e950beb16c9606a1.tar.bz2
otp-cf95a4a8b6a0d57423a89465e950beb16c9606a1.zip
Enhance elimination of useless tests in beam_jump
It can happen we have the following situation: {test,is_tuple,Fail,[R1]} {test,test_arity,Fail,[R1,N1]} {get_tuple_element,R1,N2,R2} {test,is_eq_exaqct,Fail,[R2,Atom]} {jump,Fail} Previously, the optimisation would eliminate the last is_eq_exact test, but we can do more. If the register R2 is not used in Fail, we can eliminate the get_tuple_element instruction as well as all the preceding tests. Ultimately, the whole sequence can be replaced by: {jump,Fail}
Diffstat (limited to 'lib/compiler/src/beam_listing.erl')
0 files changed, 0 insertions, 0 deletions