diff options
author | Björn Gustavsson <[email protected]> | 2018-01-25 10:09:59 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2018-01-26 15:57:57 +0100 |
commit | fbcff5a137e37edd80aca9c5fe18ce6880648169 (patch) | |
tree | fb846d82599a3e52230f1b028b59f63cb0dd09ec /lib/compiler/src/beam_type.erl | |
parent | 5b58d9e2d3262160b7f10d8b6798f89f0618c5f6 (diff) | |
download | otp-fbcff5a137e37edd80aca9c5fe18ce6880648169.tar.gz otp-fbcff5a137e37edd80aca9c5fe18ce6880648169.tar.bz2 otp-fbcff5a137e37edd80aca9c5fe18ce6880648169.zip |
Eliminate get_list/3 internally in the compiler
Instructions that produce more than one result complicate
optimizations. get_list/3 is one of two instructions that
produce multiple results (get_map_elements/3 is the other).
Introduce the get_hd/2 and get_tl/2 instructions
that return the head and tail of a cons cell, respectively,
and use it internally in all optimization passes.
For efficiency, we still want to use get_list/3 if both
head and tail are used, so we will translate matching pairs
of get_hd and get_tl back to get_list instructions.
Diffstat (limited to 'lib/compiler/src/beam_type.erl')
-rw-r--r-- | lib/compiler/src/beam_type.erl | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/compiler/src/beam_type.erl b/lib/compiler/src/beam_type.erl index b2fabed2c5..4db1309907 100644 --- a/lib/compiler/src/beam_type.erl +++ b/lib/compiler/src/beam_type.erl @@ -477,8 +477,6 @@ update({set,[D],[S1,S2],{alloc,_,{gc_bif,Op,{f,0}}}}, Ts0) -> update({set,[],_Src,_Op}, Ts0) -> Ts0; update({set,[D],_Src,_Op}, Ts0) -> tdb_update([{D,kill}], Ts0); -update({set,[D1,D2],_Src,_Op}, Ts0) -> - tdb_update([{D1,kill},{D2,kill}], Ts0); update({kill,D}, Ts) -> tdb_update([{D,kill}], Ts); |