diff options
author | Björn Gustavsson <[email protected]> | 2019-02-26 09:29:49 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2019-03-01 14:06:13 +0100 |
commit | 60656d125a0f23c1f45069fdee80a5048439f06e (patch) | |
tree | 7a701e947a6918006078ff53084dbf2c3efa994e /erts | |
parent | 8d026110bf57d66aeb25f9d294fc619453744f24 (diff) | |
download | otp-60656d125a0f23c1f45069fdee80a5048439f06e.tar.gz otp-60656d125a0f23c1f45069fdee80a5048439f06e.tar.bz2 otp-60656d125a0f23c1f45069fdee80a5048439f06e.zip |
Combine get_tuple_element when destinations are not consecutive
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/beam/instrs.tab | 2 | ||||
-rw-r--r-- | erts/emulator/beam/ops.tab | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/erts/emulator/beam/instrs.tab b/erts/emulator/beam/instrs.tab index e55c4a112d..29e8c29105 100644 --- a/erts/emulator/beam/instrs.tab +++ b/erts/emulator/beam/instrs.tab @@ -359,7 +359,7 @@ i_get_tuple_element2(Src, Element, Dst) { dst[1] = E2; } -i_get_tuple_element2y(Src, Element, D1, D2) { +i_get_tuple_element2_dst(Src, Element, D1, D2) { Eterm* src; Eterm E1, E2; src = ADD_BYTE_OFFSET(tuple_val($Src), $Element); diff --git a/erts/emulator/beam/ops.tab b/erts/emulator/beam/ops.tab index 07357a559f..96cdabaf5e 100644 --- a/erts/emulator/beam/ops.tab +++ b/erts/emulator/beam/ops.tab @@ -212,7 +212,8 @@ i_get_tuple_element xy P y %hot i_get_tuple_element2 x P x -i_get_tuple_element2y x P y y +i_get_tuple_element2_dst x P x x +i_get_tuple_element2_dst x P y y i_get_tuple_element3 x P x @@ -633,8 +634,11 @@ get_tuple_element Reg=x P1 D1=x | get_tuple_element Reg=x P2 D2=x | \ get_tuple_element Reg=x P1 D1=x | get_tuple_element Reg=x P2 D2=x | \ succ(P1, P2) | succ(D1, D2) => i_get_tuple_element2 Reg P1 D1 +get_tuple_element Reg=x P1 D1=x | get_tuple_element Reg=x P2 D2=x | \ + succ(P1, P2) | distinct(D1, Reg) => i_get_tuple_element2_dst Reg P1 D1 D2 + get_tuple_element Reg=x P1 D1=y | get_tuple_element Reg=x P2 D2=y | \ - succ(P1, P2) => i_get_tuple_element2y Reg P1 D1 D2 + succ(P1, P2) => i_get_tuple_element2_dst Reg P1 D1 D2 get_tuple_element Reg P Dst => i_get_tuple_element Reg P Dst |