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 693CEA0B36; Wed, 9 Nov 2022 15:50:46 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 693CEA0B36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1667998246; bh=3BR0pcYYvX8T3Dtkv7t0nWtxv6azSe8YJTnD0T0kGk0=; h=Date:In-Reply-To:To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=JCUXNvCaAXGywp8+ymxHrUz9xrg3cvPDTua+o2ibnLpHpujk8etxT7tNHAyufD+pj SpR08o3xLSr/CDrA2M83/h0HFVAV/oNJ86urA5powg85WXBVD7mcRA0feX7W434V8z nbUhaHRF6x9SsrV83R1JaKY97ymA2uT5RK4mpr2M= Received: from smtp45.i.mail.ru (smtp45.i.mail.ru [94.100.177.105]) (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 F041B6ECCC for ; Wed, 9 Nov 2022 15:50:44 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org F041B6ECCC Received: by smtp45.i.mail.ru with esmtpa (envelope-from ) id 1oskXU-0008Nc-7j; Wed, 09 Nov 2022 15:50:44 +0300 Message-Id: <20B52F1A-83FF-4A75-A04C-E55EE70C876D@tarantool.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_F47C8C39-A841-4063-9F62-EC007252E90E" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.200.110.1.12\)) Date: Wed, 9 Nov 2022 15:50:33 +0300 In-Reply-To: To: Maxim Kokryashkin References: <20220818232823.96280-1-m.kokryashkin@tarantool.org> X-Mailer: Apple Mail (2.3731.200.110.1.12) X-Mailru-Src: smtp X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD967121363E257EE6D2C52E15BECA78E5D9E96E8750FEF4ED300894C459B0CD1B98616CF7CBFF74DC84EEF2B87810EC71A69D080148C3ED18796A23FDDE6D060B7 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3473688ED311681BF04AEF7185A8CFD9365C63B8C0D3D2E8EB09FF78955C0C2DD521D45A42B15828AE1D7E09C32AA3244CA148DBFB2EDB7AFE6ADB9E9A425382331E098CBE561D6343927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojBHjcUwmjkk3UNMPIpgdeqQ== X-Mailru-Sender: 11C2EC085EDE56FA38FD4C59F7EFE407DE6C6BA0901B0A017F01A0A3D36B70EE14B8ED66AA396AEA19381EE24192DF5555834048F03EF5D4C9A814A92B2E3B1BA4250FC3964EA4964198E0F3ECE9B5443453F38A29522196 X-Mras: OK Subject: Re: [Tarantool-patches] [PATCH luajit v2] Cleanup math function compilation and fix inconsistencies. 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 Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" --Apple-Mail=_F47C8C39-A841-4063-9F62-EC007252E90E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Max! Thanks for the patch!=20 I believe it should bear a =E2=80=98cherry picked from=E2=80=99 label, = isn=E2=80=99t it? Otherwise LGTM. Sergos > On 22 Aug 2022, at 12:40, Sergey Kaplun via Tarantool-patches = wrote: >=20 > Hi, Maxim! >=20 > Thanks for the patch! > LGTM. >=20 > On 19.08.22, Maxim Kokryashkin wrote: >> This patch changes 'math_unary', `math_htrig` and `math_atrig` >> to `math_call` for math functions compilation. Now all of >> math functions in IRs are called with `CALLN` instead of >> `FPMATH` (`ATAN2` for `math.atan2`). >>=20 >> The `ATAN2` instruction itself is removed, as well as the fold >> optimization for it. >>=20 >> Also, this patch adds new fold optimizations for `CALLN`. >>=20 >> Part of tarantool/tarantool#7230 >> --- >> As we decided offline, no tests are provided with this patch, because >> of their extreme complexity with no real benefits. >>=20 >> Branch: = https://github.com/tarantool/luajit/tree/fckxorg/gh-7230-cleanup-math-inco= nsistencies >> PR: https://github.com/tarantool/tarantool/pull/7586 >>=20 >> src/lib_math.c | 22 +++++++++++----------- >> src/lj_asm.c | 6 ------ >> src/lj_asm_arm.h | 1 - >> src/lj_asm_arm64.h | 1 - >> src/lj_asm_x86.h | 2 -- >> src/lj_ffrecord.c | 19 ++----------------- >> src/lj_ir.h | 4 +--- >> src/lj_ircall.h | 14 +++++++++----- >> src/lj_opt_fold.c | 25 ++++++++++++++++++++++++- >> src/lj_opt_split.c | 3 --- >> src/lj_target_x86.h | 6 ------ >> src/lj_vmmath.c | 6 ------ >> 12 files changed, 47 insertions(+), 62 deletions(-) >>=20 >=20 > >=20 >> --=20 >> 2.36.1 >>=20 >=20 > --=20 > Best regards, > Sergey Kaplun --Apple-Mail=_F47C8C39-A841-4063-9F62-EC007252E90E Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi = Max!

Thanks for the = patch! 

I believe it should bear a = =E2=80=98cherry picked from=E2=80=99 label, isn=E2=80=99t = it?

Otherwise = LGTM.

Sergos


On 22 Aug 2022, at 12:40, Sergey Kaplun = via Tarantool-patches <tarantool-patches@dev.tarantool.org> = wrote:

Hi, Maxim!

Thanks for the = patch!
LGTM.

On 19.08.22, Maxim = Kokryashkin wrote:
This patch = changes 'math_unary', `math_htrig` and `math_atrig`
to `math_call` = for math functions compilation. Now all of
math functions in IRs are = called with `CALLN` instead of
`FPMATH` (`ATAN2` for = `math.atan2`).

The `ATAN2` instruction itself is removed, as well = as the fold
optimization for it.

Also, this patch adds new = fold optimizations for `CALLN`.

Part of = tarantool/tarantool#7230
---
As we decided offline, no tests are = provided with this patch, because
of their extreme complexity with no = real benefits.

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

src/lib_math.c =      | 22 = +++++++++++-----------
src/lj_asm.c =        |  6 = ------
src/lj_asm_arm.h    |  1 = -
src/lj_asm_arm64.h  |  1 -
src/lj_asm_x86.h =    |  2 --
src/lj_ffrecord.c   | 19 = ++-----------------
src/lj_ir.h =         |  4 = +---
src/lj_ircall.h     | 14 = +++++++++-----
src/lj_opt_fold.c   | 25 = ++++++++++++++++++++++++-
src/lj_opt_split.c  |  3 = ---
src/lj_target_x86.h |  6 ------
src/lj_vmmath.c =     |  6 ------
12 files changed, 47 = insertions(+), 62 deletions(-)


<snipped>

-- 
2.36.1


-- 
Best regards,
Sergey = Kaplun

= --Apple-Mail=_F47C8C39-A841-4063-9F62-EC007252E90E--