aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/ops.tab
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-11-29 15:13:05 +0100
committerBjörn Gustavsson <[email protected]>2017-11-30 12:43:22 +0100
commit67fd015394185302f769378c2c5e47bddbdc22ea (patch)
tree51957138935856b761194837d7e0f7b5c67f8485 /erts/emulator/beam/ops.tab
parent93fde6744a0c94c2d31f99cb1f9019ff6e98f83d (diff)
downloadotp-67fd015394185302f769378c2c5e47bddbdc22ea.tar.gz
otp-67fd015394185302f769378c2c5e47bddbdc22ea.tar.bz2
otp-67fd015394185302f769378c2c5e47bddbdc22ea.zip
Stop trying to maximize the use of x(0)
X register 0 used to be mapped to a hardware register, and therefore faster than the other registers. Because of that, the compiler tried to use x(0) as much as possible as a temporary register. That was changed a few releases ago. X register 0 is now placed in the array of all X registers and has no special speed advantage compared to the other registers. Remove the code in the compiler that attempts to use x(0) as much as possible. As a result, the following type of instruction will be much less frequent: {put_list,Src,{x,0},{x,0}} Instead, the following type of instruction will be more frequent: {put_list,Src,{x,X},{x,X}} (Where X is an arbitrary X register.) Update the runtime system to specialize that kind of put_list instruction.
Diffstat (limited to 'erts/emulator/beam/ops.tab')
-rw-r--r--erts/emulator/beam/ops.tab7
1 files changed, 5 insertions, 2 deletions
diff --git a/erts/emulator/beam/ops.tab b/erts/emulator/beam/ops.tab
index 3df91056cb..c30af029ce 100644
--- a/erts/emulator/beam/ops.tab
+++ b/erts/emulator/beam/ops.tab
@@ -503,6 +503,10 @@ i_put_tuple xy I
#
put_list Const=c n Dst => move Const x | put_list x n Dst
+put_list Src Dst=x Dst => update_list Src Dst
+
+update_list xyc x
+
put_list x n x
put_list y n x
put_list x x x
@@ -525,8 +529,6 @@ put_list c y x
# The following put_list instructions using x(0) are frequently used.
-put_list y r r
-put_list x r r
put_list r n r
put_list r n x
put_list r x x
@@ -537,6 +539,7 @@ put_list x x r
put_list s s d
%hot
+
#
# Some more only used by the emulator
#