[Tarantool-patches] [PATCH luajit] Limit CSE for IR_CARG to fix loop optimizations.
Sergey Kaplun
skaplun at tarantool.org
Thu Oct 17 10:16:22 MSK 2024
Sergey,
On 11.10.24, Sergey Bronnikov wrote:
> Hi, Sergey!
>
> On 08.10.2024 16:25, Sergey Kaplun wrote:
>
> <snipped>
>
> >>> +ffi.cdef[[
> >>> + double sin(double, ...);
> >>> + double cos(double, ...);
> >> Why do you use sin/cos with wrong function prototypes if you can take
> >>
> >> a function with varargs. (printf for example)?
> > I suppose this hack is well suited for our testing purposes:
> > 1) We don't need to create custom vararg functions and the corresponding
> > C libary.
> > 2) Functions usage is obvious. Also, the vararg part will be silently
> > ignored.
> >
> > Be aware that we need the result of the function's call.
> >
> Got it. I would add this as a comment. Feel free to ignore.
I've added the following comment:
===================================================================
diff --git a/test/tarantool-tests/lj-1244-missing-phi-carg.test.lua b/test/tarantool-tests/lj-1244-missing-phi-carg.test.lua
index 865cdd26..d4981299 100644
--- a/test/tarantool-tests/lj-1244-missing-phi-carg.test.lua
+++ b/test/tarantool-tests/lj-1244-missing-phi-carg.test.lua
@@ -17,6 +17,9 @@ local NTESTS = 6
test:plan(NTESTS)
+-- XXX: Hack with function's prototypes to avoid creation of
+-- custom functions to be loaded via FFI (vararg part will be just
+-- ignored).
ffi.cdef[[
double sin(double, ...);
double cos(double, ...);
===================================================================
Branch is rebased on the current master and force-pushed.
>
> LGTM
--
Best regards,
Sergey Kaplun
More information about the Tarantool-patches
mailing list