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 3A9A76E6CBD; Mon, 20 Nov 2023 14:25:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3A9A76E6CBD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1700479539; bh=V047Rz3RXwjk9vCdTBgfK8T+tlCbhJ4GJ+cosxchXbQ=; 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=q7ok0h9Sd9WdnUo9GdjOluEvZ1NQfVM8wp9Ry4trKu14VAWhj9RUF+j2eTXgslfIe f7WasG3L4WKtnOoMAnZhXsKxCjsUwo0YcasrgSG0I2FjOeybW3D7UEqWaTZZSaE8oK w0oUAhzi+lIFLS1X0+Zpb3tQQFZB+if37uHoAvJw= Received: from smtp54.i.mail.ru (smtp54.i.mail.ru [95.163.41.89]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 6E5AD6E6CBD for ; Mon, 20 Nov 2023 14:25:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6E5AD6E6CBD Received: by smtp54.i.mail.ru with esmtpa (envelope-from ) id 1r52PI-002vfZ-1M; Mon, 20 Nov 2023 14:25:36 +0300 Date: Mon, 20 Nov 2023 14:21:03 +0300 To: Maxim Kokryashkin Message-ID: References: <20231114150455.2850-1-skaplun@tarantool.org> <63wme32y5vhefounhsk2bkebl35lgselb3rcgimt6q3pr3qdgn@cxzb66tgqzzj> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <63wme32y5vhefounhsk2bkebl35lgselb3rcgimt6q3pr3qdgn@cxzb66tgqzzj> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD93F1575C7510F55479521A576BFABB5454161998EDE47712000894C459B0CD1B9467F960934A85197BD963999292CE1FB02C5EBA1E18267CA5872F0C4753F95D2 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE73F300A97FDD4E158EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F4DB495E34953D8A8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8082E409DCB5E398B8CC5B33753AC7A49117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCF80095D1E57F4578A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD1828451B159A507268D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE140C956E756FBB7A7C6FCE95544A9834D8FC6C240DEA76429C9F4D5AE37F343AA9539A8B242431040A6AB1C7CE11FEE364E7220B7C5505926E0066C2D8992A16C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947C062BEEFFB5F8EA3E2E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89F0A35B161A8BF67C1262FEC7FBD7D1F5BB5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: 0D63561A33F958A5A60DCE8688042902ACF3D4532A76A49339C64B3C927172EAF87CCE6106E1FC07E67D4AC08A07B9B08ED1AC82D843A2BBCB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF5B18002C6F31198958FCA5AB6CC61F02257AE0242B6D1934C8820924B7848AFC6BD4E2D2DF3D404788AD3775A6B0C834B9BFC021333BD6D43E5C2C0A05FD2E85E48CAC7CA610320002C26D483E81D6BE5EF9655DD6DEA7D65774BB76CC95456EEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojmRIjd71J0y3veM3xduC/Ug== X-Mailru-Sender: 11C2EC085EDE56FAC07928AF2646A769947893748A08B47B00C8C60EB5ABCD9D009DB4CE3002C7DBDEDBA653FF35249392D99EB8CC7091A70E183A470755BFD208F19895AA18418972D6B4FCE48DF648AE208404248635DF X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] Fix FOLD rule for BUFHDR append. 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 review! Fixed your comments and force-pushed the branch. On 17.11.23, Maxim Kokryashkin wrote: > Hi, Sergey! > LGTM, except for a few nits below. > On Tue, Nov 14, 2023 at 06:04:55PM +0300, Sergey Kaplun wrote: > > +-- XXX: Use 5 iterations to run variant part of the loop. > Typo: s/variant/the variant/ Fixed. > > +for _ = 1, 5 do > > + result = prefix .. 'a' > > + -- We need a non-constant string to be appended to prevent more > > + -- aggressive optimizations. Use an empty string for > > + -- convenience. Also, use a constant string in the first operand > > + -- in the concatenation operator for more readable `jit.dump` > > + -- output. > > + prefix = 'Lu' .. EMPTY_STR > > +end > > + > > +test:is(result, 'Lua', 'skipped BUFPUT APPEND optimization for PHIs') > The test description is a bit misleading. At first glance it reads like > the `BUFPUT APPEND` itself is skipped. I suggest paraphrasing it like > this: > "BUFPUT APPEND optimization is not applied for PHIs" Fixed, thanks! See the iterative patch below: =================================================================== diff --git a/test/tarantool-tests/lj-791-fold-bufhdr-append.test.lua b/test/tarantool-tests/lj-791-fold-bufhdr-append.test.lua index b2422159..19be91a4 100644 --- a/test/tarantool-tests/lj-791-fold-bufhdr-append.test.lua +++ b/test/tarantool-tests/lj-791-fold-bufhdr-append.test.lua @@ -38,7 +38,7 @@ jit.opt.start('hotloop=1') -- Which appends to buffer instead of reseting, so the resulting -- string contains one more symbol. --- XXX: Use 5 iterations to run variant part of the loop. +-- XXX: Use 5 iterations to run the variant part of the loop. for _ = 1, 5 do result = prefix .. 'a' -- We need a non-constant string to be appended to prevent more @@ -49,6 +49,6 @@ for _ = 1, 5 do prefix = 'Lu' .. EMPTY_STR end -test:is(result, 'Lua', 'skipped BUFPUT APPEND optimization for PHIs') +test:is(result, 'Lua', 'BUFPUT APPEND optimization is not applied for PHIs') test:done(true) =================================================================== Branch is force-pushed. > > + > > +test:done(true) > > -- > > 2.42.0 > > -- Best regards, Sergey Kaplun