[Tarantool-patches] [PATCH luajit] Fix FOLD rule for BUFHDR append.

Sergey Bronnikov sergeyb at tarantool.org
Fri Dec 1 17:22:48 MSK 2023


Thanks! LGTM

On 11/27/23 13:38, Sergey Kaplun wrote:
> Hi, Sergey!
> Thanks for review!
> Fixed your comment, rebased on the current master and force-pushed the
> branch.
>
> On 24.11.23, Sergey Bronnikov wrote:
>> Hello, Sergey
>>
>> thanks for the patch! LGTM with a nit below.
>>
>> On 11/14/23 18:04, Sergey Kaplun wrote:
> <snipped>
>
>>> +-- The instruction to be folded is the following:
>>> +-- 0016     p32 BUFPUT 0015 0011
>>> +--
>>> +-- The 0011 operand is PHI, which is not the last IR in the BUFSTR
>>> +-- chain (`ir->prev = REF_BIAS + 0006`). Folding this IR leads to
>>> +-- this resulting IR:
>>> +-- p32 BUFHDR 0010  APPEND
>>> +-- Which appends to buffer instead of reseting, so the resulting
>> After rebase on tarantool/master and running LuaJIT-codespell:
>>
>> reseting ==> resetting
> Thanks, fixed!
>
> ===================================================================
> 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 19be91a4..98b83ece 100644
> --- a/test/tarantool-tests/lj-791-fold-bufhdr-append.test.lua
> +++ b/test/tarantool-tests/lj-791-fold-bufhdr-append.test.lua
> @@ -35,7 +35,7 @@ jit.opt.start('hotloop=1')
>   -- chain (`ir->prev = REF_BIAS + 0006`). Folding this IR leads to
>   -- this resulting IR:
>   -- p32 BUFHDR 0010  APPEND
> --- Which appends to buffer instead of reseting, so the resulting
> +-- Which appends to buffer instead of resetting, so the resulting
>   -- string contains one more symbol.
>   
>   -- XXX: Use 5 iterations to run the variant part of the loop.
> ===================================================================
>
>>> +-- string contains one more symbol.
> <snipped>
>


More information about the Tarantool-patches mailing list