03:07 vrurg joined, vrurg_ left
timo aw yeah, first WIP draft of moarvm with [[clang::musttail]] interpreter just linked without spowing errors 10:59
well, NQP already seems to work, but extops are broken at this moment 11:06
but the first benefit is, when stepping backwards in the interpreter with rr i just "reverse-finish" and it just jumps me to the "GOTO_NEXT_OP" in whatever was the previous opcode and that's fucking fantastic 11:07
mysteriously, the nqp test suite is all green except for the qast tests which mostly fail :D 11:40
i wonder if there is something like "finish" that steps to the next tail call, to mirror what reverse-finish does with our tailcall based interpreter 11:44
"make test" is clean (plus/minus the usual) 12:18
i kind of hate that we have a "the usual test failures"
we currently have a cur_op, reg_base, cu, and bytecode_start local on the MVM_interp_run stack frame that the TC is pointed at which some operations manipulate in order to redirect the interpreter (frame invokes and returns and what-not) which in order to keep around from one interp op function to the next would have to be passed as a pointer to the place on the stack where they were set up 12:53
but that's not exactly optimal in terms of performance I think? 12:54
we do have a list of "every op that can invoke" which we could in theory use to put a "get new values if they changed" and keep passing the values themselves in registers? 12:58
that's kind of what the JIT already has to do
already possibly the tiniest bit faster than CGOTO at core setting compilation 13:13
49.443 +- 0.174 vs 49.171 +- 0.237
(averaged from 4 runs)
401,285,398 L1-icache-load-misses vs 188,166,117 L1-icache-load-misses 13:17
ok but this is also a moarvm built with gcc except for the one file, interp.c, which i used clang for because gcc doesn't seem to have __attribute__((preserve_none)) which it sounds like is very important for getting actually small function bodies for the ops themselves (otherwise there's a lot of writing registers to the stack and restoring them etc etc) 13:22
huh. passing around a pointer to a struct that has the variables in it is not any better than passing three pointer-pointers; it would be great if somehow I could make it realize that these variables could really be stack-relative, but the stack frames have to be "compatible" 13:50
i thought "the jit already has to do these checks" but it turns out we optimized this out in a clever way with the "jit trampoline" 14:24
hrmpf. so that failed ... 15:01
15:21 linkable6 left, coverable6__ left, huggable6 left, evalable6 left, releasable6 left, shareable6 left, quotable6 left, notable6 left, bisectable6 left, bloatable6 left, unicodable6 left, committable6 left, tellable6 left, sourceable6 left, benchable6 left, greppable6 left, nativecallable6 left 15:23 nativecallable6 joined 15:24 tellable6 joined, bisectable6 joined, committable6 joined 15:25 benchable6 joined, releasable6 joined, evalable6 joined, unicodable6 joined, greppable6 joined, huggable6 joined, coverable6 joined, shareable6 joined, quotable6 joined, linkable6 joined, bloatable6 joined 15:26 notable6 joined, sourceable6 joined
Geth MoarVM/tail_call_interpreter: 5a457ae4b3 | (Timo Paulssen)++ | 7 files
Tail-Call style for interp.c
16:56
MoarVM: timo++ created pull request #1999:
Tail-Call style for interp.c
17:00
timo MasterDuke17 may find this to be vindication maybe :) 17:04
OK, i'm off o/ 17:18
18:46 lizmat left, lizmat joined
lizmat thanks Timo! Was nice to have you over :-) 18:50
timo glad to have been there :) 19:09
made it safely back home