From: Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Sergey Kaplun <skaplun@tarantool.org>,
Maxim Kokryashkin <m.kokryashkin@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit 02/36] test: enable <misc/alias_alloc.lua> LuaJIT test
Date: Thu, 15 Aug 2024 15:51:02 +0300 [thread overview]
Message-ID: <a3cb59ec-542d-477b-bb31-4385d419753b@tarantool.org> (raw)
In-Reply-To: <43b0a69113d3f42a49fa42fea34516561f5ca8a7.1723638851.git.skaplun@tarantool.org>
[-- Attachment #1: Type: text/plain, Size: 3397 bytes --]
Hi, Sergey
Thanks for the patch! See my comments below.
On 14.08.2024 16:55, Sergey Kaplun wrote:
> This patch moves the <alias_alloc.lua> test from the <misc> to the
> created <opt/mem> directory, includes it in <index>, and names subtests.
>
> Testing optimizations in <lj_opt_mem.c> requires CSE, DCE, FOLD, and FWD
> optimizations enabled. Hence, the corresponding flags are used for the
> <mem> directory in <index>.
It is still unclear for me *why* a reason of this change.
Also patch contains formatting changes, I would say about it in commit
message
as we usually do it.
>
> Part of tarantool/tarantool#9398
> ---
> test/LuaJIT-tests/opt/index | 1 +
> .../{misc => opt/mem}/alias_alloc.lua | 30 +++++++++----------
> test/LuaJIT-tests/opt/mem/index | 1 +
> 3 files changed, 16 insertions(+), 16 deletions(-)
> rename test/LuaJIT-tests/{misc => opt/mem}/alias_alloc.lua (53%)
> create mode 100644 test/LuaJIT-tests/opt/mem/index
>
> diff --git a/test/LuaJIT-tests/opt/index b/test/LuaJIT-tests/opt/index
> index 94d50aec..8c43b56e 100644
> --- a/test/LuaJIT-tests/opt/index
> +++ b/test/LuaJIT-tests/opt/index
> @@ -3,4 +3,5 @@ fold +fold
> fwd +fwd
> fuse.lua +fuse
> loop +loop
> +mem +cse +dse +fold +fwd
> sink +sink
> diff --git a/test/LuaJIT-tests/misc/alias_alloc.lua b/test/LuaJIT-tests/opt/mem/alias_alloc.lua
> similarity index 53%
> rename from test/LuaJIT-tests/misc/alias_alloc.lua
> rename to test/LuaJIT-tests/opt/mem/alias_alloc.lua
> index 02fe618d..a9627b55 100644
> --- a/test/LuaJIT-tests/misc/alias_alloc.lua
> +++ b/test/LuaJIT-tests/opt/mem/alias_alloc.lua
> @@ -1,8 +1,7 @@
> -
> -do
> +do --- ALOAD forwarding, same table.
> local t = {1}
> local x
> - for i=1,100 do
> + for i = 1, 100 do
> local v = {i}
> t[1] = v[1]
> x = v[1]
> @@ -10,45 +9,44 @@ do
> assert(x == 100 and t[1] == 100)
> end
>
> -do
> +do --- ALOAD forwarding, different tables.
> local t = {1}
> local x,y
> - for i=1,100 do
> + for i = 1, 100 do
> local v = {i}
> - local w = {i+1}
> + local w = {i + 1}
> x = v[1]
> y = w[1]
> end
> assert(x == 100 and y == 101)
> end
>
> -do
> +do --- FLOAD forwarding.
> local mt = {}
> local t = setmetatable({}, mt)
> local x
> - for i=1,100 do
> + for _ = 1, 100 do
> local v = {}
> setmetatable(v, getmetatable(t))
> assert(getmetatable(v) == mt)
> end
> end
>
> --- See also sink_alloc.lua
> -do
> - local x,k={1,2},{3,4}
> - for i=1,100 do x = {x[1]+k[1], x[2]+k[2]} end
> +-- See also <opt/sink/alloc.lua>.
> +do --- Forwarding the constant-on-trace table in the complex add.
> + local x, k = {1, 2}, {3, 4}
> + for _ = 1, 100 do x = {x[1] + k[1], x[2] + k[2]} end
> assert(x[1] == 301)
> assert(x[2] == 402)
> end
>
> --- FLOAD for tab.asize/tab.array crossing NEWREF.
> -do
> +
> +do --- FLOAD forwarding for tab.asize/tab.array crossing NEWREF.
> local t = {1}
> - for i=1,100 do
> + for _ = 1, 100 do
> local v = {}
> local w = {}
> v[1] = t[1]
> w[1] = t[1]
> end
> end
> -
> diff --git a/test/LuaJIT-tests/opt/mem/index b/test/LuaJIT-tests/opt/mem/index
> new file mode 100644
> index 00000000..0b1856ed
> --- /dev/null
> +++ b/test/LuaJIT-tests/opt/mem/index
> @@ -0,0 +1 @@
> +alias_alloc.lua
[-- Attachment #2: Type: text/html, Size: 3911 bytes --]
next prev parent reply other threads:[~2024-08-15 12:51 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-14 13:55 [Tarantool-patches] [PATCH luajit 00/36] Rearrange LuaJIT misc tests Sergey Kaplun via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 01/36] test: don't run JIT-based LuaJIT tests without JIT Sergey Kaplun via Tarantool-patches
2024-08-15 12:47 ` Sergey Bronnikov via Tarantool-patches
2024-08-19 8:47 ` Sergey Kaplun via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 02/36] test: enable <misc/alias_alloc.lua> LuaJIT test Sergey Kaplun via Tarantool-patches
2024-08-15 12:51 ` Sergey Bronnikov via Tarantool-patches [this message]
2024-08-15 13:31 ` Sergey Kaplun via Tarantool-patches
2024-08-30 7:25 ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 03/36] test: refactor <lang/coroutine.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:00 ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 04/36] test: remove <misc/coro_yield.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:05 ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 05/36] test: enable <misc/debug_gc.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:09 ` Sergey Bronnikov via Tarantool-patches
2024-08-15 13:25 ` Sergey Kaplun via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 06/36] test: enable <misc/dualnum.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:11 ` Sergey Bronnikov via Tarantool-patches
2024-08-15 13:19 ` Sergey Bronnikov via Tarantool-patches
2024-08-15 13:22 ` Sergey Kaplun via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 07/36] test: remove <misc/fori_coerce.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:20 ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 08/36] test: remove <misc/fori_dir.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:21 ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 09/36] test: remove <misc/gc_rechain.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:22 ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 10/36] test: enable <misc/gc_trace.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:24 ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 11/36] test: enable <misc/gcstep.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:34 ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 12/36] test: enable <misc/hook_active.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:38 ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 13/36] test: enable <misc/hook_line.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:42 ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 14/36] test: enable <misc/hook_norecord.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:56 ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 15/36] test: enable <misc/hook_record.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:57 ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 16/36] test: enable <misc/hook_top.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 17/36] test: enable <misc/jit_flush.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 18/36] test: remove <misc/loop_unroll.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 19/36] test: enable <misc/parse_comp.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 20/36] test: enable <misc/parse_esc.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 21/36] test: enable <misc/parse_misc.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 22/36] test: enable <misc/phi_conv.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 23/36] test: enable <misc/recurse_deep.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 24/36] test: remove <misc/recurse_tail.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 25/36] test: enable <misc/stack_gc.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 26/36] test: enable <misc/stack_purge.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 27/36] test: enable <misc/stackov.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 28/36] test: enable <misc/stackovc.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 29/36] test: enable <misc/tcall_base.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 30/36] test: enable <misc/tcall_loop.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 31/36] test: enable <misc/tonumber_scan.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 32/36] test: remove <misc/uclo.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 33/36] test: enable <misc/unordered_jit.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 34/36] test: enable <misc/wbarrier.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 35/36] test: enable <misc/wbarrier_jit.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 36/36] test: enable <misc/wbarrier_obar.lua> " Sergey Kaplun 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=a3cb59ec-542d-477b-bb31-4385d419753b@tarantool.org \
--to=tarantool-patches@dev.tarantool.org \
--cc=m.kokryashkin@tarantool.org \
--cc=sergeyb@tarantool.org \
--cc=skaplun@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH luajit 02/36] test: enable <misc/alias_alloc.lua> LuaJIT test' \
/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