Tarantool development patches archive
 help / color / mirror / Atom feed
From: Maxim Kokryashkin via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: "Sergey Kaplun" <skaplun@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches]  [PATCH luajit] ARM64: Fix {AHUV}LOAD specialized to nil/false/true.
Date: Mon, 06 Mar 2023 18:29:51 +0300	[thread overview]
Message-ID: <1678116591.871533275@f309.i.mail.ru> (raw)
In-Reply-To: <ZAA5tXy+JvQ8hemY@root>

[-- Attachment #1: Type: text/plain, Size: 1578 bytes --]


Hi!
Thanks for the fixes!
LGTM
 
>
>> >>+-- Those `rn` variables before and after `main_payload` are
>> >>+-- required to generate enough register pressure (for GPR). Amount
>> >>+-- of repeats is empirical.
>> >>+-- Additional `test_f(...)` wrapper is needed for IR_VLOAD usage,
>> >>+-- when `main_payload` is just `...`.
>> >>+local function generate_payload(n_fillers, main_payload)
>> >>+ local code_chunk = 'local function test_f(...)\n'
>> >>+ code_chunk = code_chunk .. 'local r\n'
>> >>+ for i = 1, n_fillers do
>> >>+ code_chunk = code_chunk .. ('local rup%d\n'):format(i)
>> >>+ end
>> >>+ code_chunk = code_chunk .. 'for _ = 1, 4 do\n'
>> >>+ for i = 1, n_fillers do
>> >>+ code_chunk = code_chunk ..
>> >>+ ('local r%d = ffi.cast("int", %d)\n'):format(i, i)
>> >>+ end
>> >>+ code_chunk = code_chunk .. 'r = ' .. main_payload .. '\n'
>> >>+ for i = 1, n_fillers do
>> >>+ code_chunk = code_chunk .. ('rup%d = r%d\n'):format(i, i)
>> >>+ end
>> >>+ code_chunk = code_chunk .. 'end\nend\n'
>> >>+ code_chunk = code_chunk .. 'return test_f'
>> >>+ local f, err = loadstring(code_chunk, 'test_function')
>> >>+ assert(type(f) == 'function', err)
>> >>+ f = f()
>> >>+ assert(type(f) == 'function', 'returned generated value is not a function')
>> >>+ return f
>> >>+end
>> >That section is really hard to read, is there any way to make it more
>> >readable? I believe even slight reformatting might help.
>
>I've add the additional empty lines to separate cycle's body
>generation.
>Does it help?
Yes, that is way better, thanks.
--
Best regards,
Maxim Kokryashkin
 

[-- Attachment #2: Type: text/html, Size: 2146 bytes --]

  reply	other threads:[~2023-03-06 15:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-25 18:57 Sergey Kaplun via Tarantool-patches
2023-02-28  9:52 ` Maxim Kokryashkin via Tarantool-patches
2023-03-02  5:52   ` Sergey Kaplun via Tarantool-patches
2023-03-06 15:29     ` Maxim Kokryashkin via Tarantool-patches [this message]
2023-03-10 14:49 ` Igor Munkin via Tarantool-patches
2023-03-30 17:37 ` Igor Munkin via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1678116591.871533275@f309.i.mail.ru \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=m.kokryashkin@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches]  [PATCH luajit] ARM64: Fix {AHUV}LOAD specialized to nil/false/true.' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox