aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/icode/hipe_beam_to_icode.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-11-20 15:33:45 +0100
committerGitHub <[email protected]>2017-11-20 15:33:45 +0100
commit9556949af97553ad99133d2198b8d92c18de98c7 (patch)
treef1c54591092346269c7b1bd7a5dfd9e7459b3d08 /lib/hipe/icode/hipe_beam_to_icode.erl
parentb64a07a11ea5e83fd207fc024d11dcb0c57f35a6 (diff)
parent8e8380865bb31c119e7f11fbdbbb14ea58ebbef2 (diff)
downloadotp-9556949af97553ad99133d2198b8d92c18de98c7.tar.gz
otp-9556949af97553ad99133d2198b8d92c18de98c7.tar.bz2
otp-9556949af97553ad99133d2198b8d92c18de98c7.zip
Merge PR-1632 from margnus1/hipe-receive-opt OTP-14785
HiPE: Optimise receives matching unique references
Diffstat (limited to 'lib/hipe/icode/hipe_beam_to_icode.erl')
-rw-r--r--lib/hipe/icode/hipe_beam_to_icode.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/hipe/icode/hipe_beam_to_icode.erl b/lib/hipe/icode/hipe_beam_to_icode.erl
index cb4c1cfbd3..4c7fbad711 100644
--- a/lib/hipe/icode/hipe_beam_to_icode.erl
+++ b/lib/hipe/icode/hipe_beam_to_icode.erl
@@ -415,11 +415,13 @@ trans_fun([{wait_timeout,{_,Lbl},Reg}|Instructions], Env) ->
SuspTmout = hipe_icode:mk_if(suspend_msg_timeout,[],
map_label(Lbl),hipe_icode:label_name(DoneLbl)),
Movs ++ [SetTmout, SuspTmout, DoneLbl | trans_fun(Instructions,Env1)];
-%%--- recv_mark/1 & recv_set/1 --- XXX: Handle better??
+%%--- recv_mark/1 & recv_set/1 ---
trans_fun([{recv_mark,{f,_}}|Instructions], Env) ->
- trans_fun(Instructions,Env);
+ Mark = hipe_icode:mk_primop([],recv_mark,[]),
+ [Mark | trans_fun(Instructions,Env)];
trans_fun([{recv_set,{f,_}}|Instructions], Env) ->
- trans_fun(Instructions,Env);
+ Set = hipe_icode:mk_primop([],recv_set,[]),
+ [Set | trans_fun(Instructions,Env)];
%%--------------------------------------------------------------------
%%--- Translation of arithmetics {bif,ArithOp, ...} ---
%%--------------------------------------------------------------------