00:02 moritz_ joined, japhb_ joined, nwc10_ joined, hoelzro_ joined, ashleydev joined 00:03 BinGOs_ joined 00:06 BinGOs joined 00:45 avuserow joined 01:06 FROGGS_ joined
timotimo it seems like the optimize_can_op part of spesh no longer causes a problem (though i had to teach it about VMNull, too) 01:08
up to S17 for the spectests now 01:09
01:09 harrow joined
timotimo allof.t seems to be unhappy right now 01:10
nope. running it manually makes it pass, so it's only flappy 01:14
hm. 99problems-51-to-60.t segfaults in a gc run triggered by a MVM_exception_backtrace 01:15
not so good
i'll just commit and see if anybody who wakes up before i do wants to look at it :) 01:16
t/spec/integration/advent2013-day07.t fails one test, which seems to be because we changed parcels to be value types and their which now gives the same value for equivalent parcels 01:17
dalek arVM/optimize_can_op: a6d4e42 | (Timo Paulssen)++ | src/spesh/optimize.c:
reactivate optimize_can_op, teach it about VMNull.

currently makes t/spec/integration/99problems-51-to-60.t crash
01:18
01:24 harrow joined 06:02 mj41_nb joined
sergot hi o/ 06:25
06:58 zakharyas joined 07:32 odc joined 08:33 kjs_ joined 08:48 brrt joined 09:03 kjs_ joined 09:05 brrt left 09:37 daxim joined 09:42 donaldh joined
dalek arVM: c7bde5b | (Bart Wiegmans)++ | 3rdparty/dynasm:
Update dynasm (ignore minilua executable)

10:30
timotimo i wonder how we'd be able to fix something like "smart numify turns some object into a num, then we coerce the num into an int" when the smart numify itself was unboxing an int and coercing to a num ... 13:45
that sounds like a "peephole optimization" technique
13:48 FROGGS[mobile] joined 13:49 tadzik joined
jnthn Aye 13:49
And probably a rather useful one
timotimo i have not actually checked if this really does happen, mind you :) 13:55
jnthn It does. 13:57
timotimo OK 13:58
jnthn I'd be tempted to hack it into optimzie_smart_coerce
timotimo we could have a "want" mechanism for this case :P
jnthn But temptation isnt always a good thing... :)
timotimo as in "look forward in the instruction stream to see if the number we're building is going to be coerced to int soon"?
jnthn Yeah. I think it will always be next instruction, from what I know of code-gen. 14:00
So it's just a one instruction lookahead
timotimo mhm 14:01
what do you think of installing a "peephole optimization stage" right after spesh, btw? 14:02
jnthn Well, for this particular case it's easier with a lookaehad rather than Yet Another Pass 14:39
TimToady though C# seems to do fine with 50 passes or so 15:05
jnthn timotimo: Mini-project if it takes your fancy: work out why MATCH does not JIT, only speshes. 15:22
timotimo i suppose i could have a look :) 15:23
jnthn In the parse-json benchmark in NQP it's the hottest thing 15:24
timotimo i also considered stubbing the "this object has a destructor" thing in moarvm and nqp, but i ran into too many open questions 15:29
jnthn Yeah; that one is tricky. It's on my pondering list at the moment 15:30
timotimo especially: how do we handle DESTROY methods and subclasses?
jnthn It's a submethod, no?
timotimo i didn't look
if it is, that'd be simple
jnthn But you call from the kids up to granny, iirc 15:31
Opposite order from BILD submethod calls
Uh, BUILD
timotimo that's not as simple any more :P
jnthn: i feel like we've already found this out once before; MATCH bails on bindattrs_i 15:45
timotimo looks into that some more 15:47
tadzik colomon: this looks like a good set of patches to me 15:48
timotimo it wants a is-type-object check to be emitted
tadzik oh, ww 15:49
timotimo (actually, it'll need a reprconv function for that anyway, as it also forces a write barrier apparently?)
15:51 odc joined
timotimo well, i can probably just re-use MVM_repr_bind_attr_inso for this ... curiously that one doesn't include the SC_WB ... it probably should, though 15:52
jnthn Yes, unless interp.c does it?
timotimo interp.c doesn't use MVM_repr_... 15:53
it directly uses the REPR(...)->...
now MATCH gets jitted 15:54
at least for the json benchmark
jnthn I don't see wy benchmark would make a diff :) 15:55
timotimo yup.
in the routines tab it gets an OSR flag and about 1/5 is spesh, the rest is JIT
(and probably an invisible amount is interp)
jnthn Ah, darn, its' midnight, I should be attempting to be unconcious... 15:58
timotimo interesting. !protoregex is not jitted at all, has 3520 calls from arraylist, but doesn't get jitted at all. can't find any bails in the jitlog, though
TimToady you've still got a minute
timotimo i'll do a rakudo build and spectest with the bindattrs implementation
jnthn timotimo: Is it inlined? 15:59
Oh no, it's normally things that call it that get inlined 16:00
Sinc ethe things that call it are just delegating to it.
Anyway, time to go rest... :) 16:01
lizmat gnight jnthn: sleep well, get better!
jnthn lizmat: Thanks, hopefully! :) 16:02
timotimo the second most time consuming piece of the json benchmark seems to be str, which isn't getting jitted because indexnat doesn't have a jit yet 16:24
after that comes ws, which bails on findnotcclass 16:25
dalek arVM: ede37df | (Timo Paulssen)++ | src/6model/reprconv.c:
MVM_repr_bind_attr_* needs to do a SC write barrier

16:27
arVM: fd94423 | (Timo Paulssen)++ | src/jit/graph.c:
can now jit bindattrs_*, which helps MATCH.

17:00 Ven_ joined 17:08 vendethiel joined 17:49 brrt joined 18:05 Ven_ joined
brrt uhm, why does MVM_string_char_at_in_string return -2 ? 18:42
right, out of bounds 18:43
great
is that ever used anywhere? 18:44
FROGGS brrt: yes, I remember that we made it -2 so we can check whether it was oob 18:48
brrt subtle
:-)
FROGGS brrt: look at interp.c:1455 18:51
brrt yeah, i've seen it
it's just that the magic needed to do that in ASM is quite subtle
two flappy tests on the spectests, i'll push
dalek arVM: 965b7af | (Bart Wiegmans)++ | src/jit/ (2 files):
Add indexnat to JIT

18:54
FROGGS typo "if it ise" 18:55
dalek arVM: 03626bd | (Bart Wiegmans)++ | src/jit/emit_x64.dasc:
Fix typo in comment

18:56
brrt FROGGS++
FROGGS <--- le awesome JIT hacker :P 18:57
brrt this should help timotimo's thingy 19:00
19:14 brrt left 19:33 Ven_ joined 19:39 Ven_ joined
timotimo cool, thanks! 20:13
indexnat is branchy, right?
i think that's what kept me from doing it in the past
findnotcclass and findcclass should be easily doable for me now
brrt++ # indexnat
oooh, indexat *and* indexnat 20:25
20:45 kjs_ joined
timotimo so what was the deal with argconst_s? i seem to recall those weren't supposed to show up any more? 20:57
with 10 frames bailed, it's pretty expensive for the json parsing benchmark 20:58
the core setting still has more than 100 bails caused by param_* op nonjittability 21:02
21:02 donaldh joined
dalek arVM: e2aa5a6 | (Timo Paulssen)++ | src/jit/graph.c:
JIT findcclass and findnotcclass

21:16
21:41 ggoebel1111112 joined 21:57 kjs_ joined 23:27 itz joined