aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2019-03-03 08:13:47 +0100
committerBjörn Gustavsson <[email protected]>2019-03-06 15:42:42 +0100
commit90bf10302a792865cdb0f741e23ca130725e7461 (patch)
tree429cacdddd9b8055a44e1a64d6b108b82b7f1f82 /erts/emulator/beam
parentca68fe8277c5f534d32c8d5bf0e5ba66ebf124e0 (diff)
downloadotp-90bf10302a792865cdb0f741e23ca130725e7461.tar.gz
otp-90bf10302a792865cdb0f741e23ca130725e7461.tar.bz2
otp-90bf10302a792865cdb0f741e23ca130725e7461.zip
Remove optimization that has become a pessimization
The compiler used to generate "move Literal y(Y)" instructions very rarely. Therefore, there was a transformation to avoid having a "move c y" instruction. With the new compiler, "move Literal y(Y)" instructions are relatively frequent, so we will need a "move c y" instruction.
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/ops.tab14
1 files changed, 4 insertions, 10 deletions
diff --git a/erts/emulator/beam/ops.tab b/erts/emulator/beam/ops.tab
index 448412c903..81f598d266 100644
--- a/erts/emulator/beam/ops.tab
+++ b/erts/emulator/beam/ops.tab
@@ -392,20 +392,14 @@ move3 x x x x x x
move C=aiq X=x==1 => move_x1 C
move C=aiq X=x==2 => move_x2 C
+move n D=y => init D
+
move_x1 c
move_x2 c
-# The compiler almost never generates a "move Literal y(Y)" instruction,
-# so let's cheat if we encounter one.
-move S=n D=y => init D
-move S=c D=y => move S x | move x D
-
-move x x
-move x y
-move y x
-move c x
+move xy xy
+move c xy
move n x
-move y y
# The following move instructions using x(0) are frequently used.