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 7F4416F15B; Mon, 22 Aug 2022 12:43:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 7F4416F15B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1661161407; bh=XxWxBXT+vu5OBWPdfnsmmVEOJWO+1SDKlm7EgeLCpFM=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=vaTw1H80+opei315bZ/9zlrprAZkHCGUsq/ofLLz6pw4qimjVeblPPkm5IZ2yy1vk fCXh/ilqQ4lh313se9VVnSAgSq/IvmIxVaWJK0eVjyIEuS1uvhnMr3eUixIDM/AONc TjHAavDZMEz7Y7rr9LR1APireT7eHe1SEZ5WMXXg= Received: from smtp54.i.mail.ru (smtp54.i.mail.ru [217.69.128.34]) (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 E37F96F15B for ; Mon, 22 Aug 2022 12:43:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E37F96F15B Received: by smtp54.i.mail.ru with esmtpa (envelope-from ) id 1oQ3xs-00034c-Vz; Mon, 22 Aug 2022 12:43:25 +0300 Date: Mon, 22 Aug 2022 12:40:51 +0300 To: Maxim Kokryashkin Message-ID: References: <20220818232823.96280-1-m.kokryashkin@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220818232823.96280-1-m.kokryashkin@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD999D8F08CF16C6CA7E05857EF2F40B817D04A43EDFDE81EB700894C459B0CD1B93273843D52AA12DF8C94A5AD2A5F51CF54763F37B158AC9F0617A7DEC1BA40D2 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE752E71F0C64B7C834EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006378B6D775AC58C227F8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8853D11C36D1569B81B39FB5804C75F85117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC2EE5AD8F952D28FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD182CC0D3CB04F14752D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EED76C6ED7039589DE03CEA74F0D118906D8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3B355ED1E20F5346A302FCEF25BFAB345C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F79006373BA04B6A498D0BA4731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 9604B64F49C60606AD91A466A1DEF99B296C473AB1E142185AC9E3593CE4B31AB1881A6453793CE9274300E5CE05BD4401A9E91200F654B0C7A0BC55FA0FE5FC67F359E3D6B0E837B1170C72B0FD087166D52AAD05229DBCB1881A6453793CE9C32612AADDFBE06133F7A9E5587C79A693EDB24507CE13387DFF0A840B692CF8 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D340A4C04F5DECA7EE9AD9356DB492A386D0DEA522ABF9F4F407B5B1C9D360F5B69CB55DEEBCB0A6A301D7E09C32AA3244CF782607E3487D7BE2A233B80AC596E468580396430872480927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojq6mpPMt02ji/MaZ81JWhzw== X-Mailru-Sender: 07FBBCF39629D1142254247A6196FF9B67D5BC65A95F57936FFB15C862E30CA71442BDFAA4939184DEDBA653FF35249392D99EB8CC7091A70E183A470755BFD208F19895AA18418972D6B4FCE48DF648AE208404248635DF 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: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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-inconsistencies > 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(-) > > -- > 2.36.1 > -- Best regards, Sergey Kaplun