From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id F12EF13E161; Wed, 30 Nov 2022 16:24:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org F12EF13E161 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1669814664; bh=SalUpxvVNBm+PMGNOFc6vlORDBQKvT4G+ynQo7bhJNk=; h=Date:References:To:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=XNnvS4UmDXeYOz4nfPyRMI/yCFJCNuKqS86esiGttjfzLltY72fffyufoyS4G7EAJ MmcdNFve8aAXBZZVHQlvAYY5f/Deacnpi6eRVxyHGirtiSRy7kG01rHli/ANrC0WVY yydQGZmAoWRTzZgdvkkbf+GoshWY9Zu6e2mWm8tw= Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [94.100.177.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id BD3B713E145 for ; Wed, 30 Nov 2022 16:24:22 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org BD3B713E145 Received: by smtp50.i.mail.ru with esmtpa (envelope-from ) id 1p0N4S-0000jh-Uo; Wed, 30 Nov 2022 16:24:22 +0300 Content-Type: multipart/alternative; boundary="Apple-Mail=_3AA21D94-E885-414D-8219-F9B968C2FC0C" X-Priority: 3 (Normal) Date: Wed, 30 Nov 2022 16:24:06 +0300 References: <9DD05C29-8449-4975-8F76-672EEBC3D80B@tarantool.org> To: tarantool-patches@dev.tarantool.org, Igor Munkin , Sergey Kaplun Message-Id: <1D95B177-6239-4771-9ED9-E784C3166EF5@tarantool.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.200.110.1.12\)) X-Mailer: Apple Mail (2.3731.200.110.1.12) X-Mailru-Src: smtp X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9288A4F1FFA5F9905C03554E5B8674B9A7E09D1799A395A75182A05F5380850404C228DA9ACA6FE2764DE7A659DC057E6E124F9BE8BFC943C62BD1AB663DA9C77A3B6283622DDB047 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34AB80C45F81B80D63282CF09D60E757F5A92B5B95F5B398934358C4234B34795538A4FBF410AE94261D7E09C32AA3244CB7578AD00173461CE9C06C7BABF23C8AC3B3ADDA61883BB5FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojWg9qwXN3O9W7O9tmZN7rzQ== X-Mailru-Sender: 11C2EC085EDE56FA38FD4C59F7EFE4079CDCCFB4D64D72E0BFB8091BD0B6B01DE5C577C2A445EC2819381EE24192DF5555834048F03EF5D4C9A814A92B2E3B1BA4250FC3964EA4964198E0F3ECE9B5443453F38A29522196 X-Mras: OK Subject: [Tarantool-patches] Fwd: [PATCH luajit v2] Don't compile math.modf() anymore. X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: sergos via Tarantool-patches Reply-To: sergos Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" --Apple-Mail=_3AA21D94-E885-414D-8219-F9B968C2FC0C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Begin forwarded message: >=20 > From: sergos > Subject: Re: [Tarantool-patches] [PATCH luajit v2] Don't compile = math.modf() anymore. > Date: 30 November 2022, 16:23:31 GMT+3 > To: Maxim Kokryashkin >=20 > Hi! >=20 > The change looks like =E2=80=9CI don=E2=80=99t know why it might not = work, lets drop it=E2=80=9D. > But since it just leads to a FUNCC and trace can be stiched thereafter > it LGTM. >=20 > Sergos >=20 >> =D0=9E=D1=82 =D0=BA=D0=BE=D0=B3=D0=BE: Maxim Kokryashkin via = Tarantool-patches >> =D0=9A=D0=BE=D0=BC=D1=83: tarantool-patches@dev.tarantool.org, = imun@tarantool.org, skaplun@tarantool.org >> =D0=94=D0=B0=D1=82=D0=B0: =D0=9F=D1=8F=D1=82=D0=BD=D0=B8=D1=86=D0=B0, = 19 =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2022, 0:21 +03:00 >> =D0=A2=D0=B5=D0=BC=D0=B0: [Tarantool-patches] [PATCH luajit v2] Don't = compile math.modf() anymore. >> =20 >> From: Mike Pall >>=20 >> This commit disables compilation for the `math.modf` function since = it's >> rarely used and compiling it in a performant enough way would be >> difficult. >>=20 >> Part of tarantool/tarantool#7230 >> --- >>=20 >> There are no issues with correctenss of compilation >> of math.modf whatsoever. There are no known issues with it, and all = of >> the possible edge cases are handled well both with active >> and inactivve JIT. It's safe to assume that the `properly compiling` >> in the original commit message refers to performance rather than >> correctness. >>=20 >> PR: https://github.com/tarantool/tarantool/pull/7586 >> Branch: = https://github.com/tarantool/luajit/tree/fckxorg/gh-7230-math-modf >>=20 >> src/lib_math.c | 2 +- >> src/lj_ffrecord.c | 16 ---------------- >> 2 files changed, 1 insertion(+), 17 deletions(-) >>=20 >> diff --git a/src/lib_math.c b/src/lib_math.c >> index ef9dda2d..4e6d2458 100644 >> --- a/src/lib_math.c >> +++ b/src/lib_math.c >> @@ -45,7 +45,7 @@ LJLIB_ASM_(math_sinh) LJLIB_REC(math_htrig = IRCALL_sinh) >> LJLIB_ASM_(math_cosh) LJLIB_REC(math_htrig IRCALL_cosh) >> LJLIB_ASM_(math_tanh) LJLIB_REC(math_htrig IRCALL_tanh) >> LJLIB_ASM_(math_frexp) >> -LJLIB_ASM_(math_modf) LJLIB_REC(.) >> +LJLIB_ASM_(math_modf) >>=20 >> LJLIB_ASM(math_log) LJLIB_REC(math_log) >> { >> diff --git a/src/lj_ffrecord.c b/src/lj_ffrecord.c >> index be890a93..ac9c9ba1 100644 >> --- a/src/lj_ffrecord.c >> +++ b/src/lj_ffrecord.c >> @@ -601,22 +601,6 @@ static void LJ_FASTCALL = recff_math_htrig(jit_State *J, RecordFFData *rd) >> J->base[0] =3D emitir(IRTN(IR_CALLN), tr, rd->data); >> } >>=20 >> -static void LJ_FASTCALL recff_math_modf(jit_State *J, RecordFFData = *rd) >> -{ >> - TRef tr =3D J->base[0]; >> - if (tref_isinteger(tr)) { >> - J->base[0] =3D tr; >> - J->base[1] =3D lj_ir_kint(J, 0); >> - } else { >> - TRef trt; >> - tr =3D lj_ir_tonum(J, tr); >> - trt =3D emitir(IRTN(IR_FPMATH), tr, IRFPM_TRUNC); >> - J->base[0] =3D trt; >> - J->base[1] =3D emitir(IRTN(IR_SUB), tr, trt); >> - } >> - rd->nres =3D 2; >> -} >> - >> static void LJ_FASTCALL recff_math_pow(jit_State *J, RecordFFData = *rd) >> { >> J->base[0] =3D lj_opt_narrow_pow(J, J->base[0], J->base[1], >> -- >> 2.36.1 >> =20 >=20 --Apple-Mail=_3AA21D94-E885-414D-8219-F9B968C2FC0C Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

Begin = forwarded message:

From: sergos = <sergos@tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH luajit v2] Don't compile = math.modf() anymore.
Date: 30 November 2022, 16:23:31 GMT+3
To: = Maxim Kokryashkin = <m.kokryashkin@tarantool.org>

Hi!

The change looks = like =E2=80=9CI don=E2=80=99t know why it might not work, lets drop = it=E2=80=9D.
But since it just leads to a FUNCC and trace can = be stiched thereafter
it = LGTM.

Sergos

=D0=9E=D1=82 =D0=BA=D0=BE=D0=B3=D0=BE: = Maxim Kokryashkin via Tarantool-patches = <tarantool-patches@dev.tarantool.org>
=D0=9A=D0=BE=D0=BC=D1=83: = tarantool-patches@dev.tarantool.org, imun@tarantool.org, = skaplun@tarantool.org
=D0=94=D0=B0=D1=82=D0=B0: =D0=9F=D1=8F=D1=82=D0=BD= =D0=B8=D1=86=D0=B0, 19 =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2022, = 0:21 +03:00
=D0=A2=D0=B5=D0=BC=D0=B0: [Tarantool-patches] [PATCH = luajit v2] Don't compile math.modf() anymore.
 
From: Mike Pall = <mike>

This commit disables compilation for the `math.modf` = function since it's
rarely used and compiling it in a performant = enough way would be
difficult.

Part of = tarantool/tarantool#7230
---

There are no issues with = correctenss of compilation
of math.modf whatsoever. There are no = known issues with it, and all of
the possible edge cases are handled = well both with active
and inactivve JIT. It's safe to assume that the = `properly compiling`
in the original commit message refers to = performance rather than
correctness.

PR: https://github.com/tarantool/tarantool/pull/7586
= Branch: https://github.com/tarantool/luajit/tree/fckxorg/gh-7230= -math-modf

 src/lib_math.c | 2 = +-
 src/lj_ffrecord.c | 16 ----------------
 2 files = changed, 1 insertion(+), 17 deletions(-)

diff --git = a/src/lib_math.c b/src/lib_math.c
index ef9dda2d..4e6d2458 = 100644
--- a/src/lib_math.c
+++ b/src/lib_math.c
@@ -45,7 +45,7 = @@ LJLIB_ASM_(math_sinh) LJLIB_REC(math_htrig = IRCALL_sinh)
 LJLIB_ASM_(math_cosh) LJLIB_REC(math_htrig = IRCALL_cosh)
 LJLIB_ASM_(math_tanh) LJLIB_REC(math_htrig = IRCALL_tanh)
 LJLIB_ASM_(math_frexp)
-LJLIB_ASM_(math_modf) = LJLIB_REC(.)
+LJLIB_ASM_(math_modf)

 LJLIB_ASM(math_log) = LJLIB_REC(math_log)
 {
diff --git a/src/lj_ffrecord.c = b/src/lj_ffrecord.c
index be890a93..ac9c9ba1 100644
--- = a/src/lj_ffrecord.c
+++ b/src/lj_ffrecord.c
@@ -601,22 +601,6 @@ = static void LJ_FASTCALL recff_math_htrig(jit_State *J, RecordFFData = *rd)
   J->base[0] =3D emitir(IRTN(IR_CALLN), tr, = rd->data);
 }

-static void LJ_FASTCALL = recff_math_modf(jit_State *J, RecordFFData *rd)
-{
- TRef tr =3D = J->base[0];
- if (tref_isinteger(tr)) {
- J->base[0] =3D = tr;
- J->base[1] =3D lj_ir_kint(J, 0);
- } else {
- TRef = trt;
- tr =3D lj_ir_tonum(J, tr);
- trt =3D = emitir(IRTN(IR_FPMATH), tr, IRFPM_TRUNC);
- J->base[0] =3D = trt;
- J->base[1] =3D emitir(IRTN(IR_SUB), tr, trt);
- }
- = rd->nres =3D 2;
-}
-
 static void LJ_FASTCALL = recff_math_pow(jit_State *J, RecordFFData = *rd)
 {
   J->base[0] =3D = lj_opt_narrow_pow(J, J->base[0], = J->base[1],
--
2.36.1
 
=


= --Apple-Mail=_3AA21D94-E885-414D-8219-F9B968C2FC0C--