01:50 ilbot3 joined 04:56 jepeway joined 05:35 quester joined 07:16 FROGGS joined 09:04 FROGGS joined 09:46 FROGGS joined 10:56 vendethiel joined 13:20 camelia joined
dalek arVM: 2be52fd | brrt++ | src/spesh/ (7 files):
Change throw_adhoc to oops in spesh

Spesh routines should probably not throw catchable exceptions.
14:00
14:59 AndChat|228864 joined
AndChat|228864 brrt: they forgot to publish the news about your grant? 15:00
15:20 zakharyas joined 18:25 FROGGS joined 19:40 dalek joined 19:59 brrt joined 20:01 brrt` joined 20:02 brrt` left 20:07 brrt joined
brrt AndChat|228864: I suspect they either expected me to publish it, or haven't gotten around to it yet 20:08
also, would it maybe be a nice idea if I could do a talk at YAPC::EU
timotimo +1 20:11
brrt: do you have a clue what might be wrong about my BBs and preds and succs in my branch?
in "union_goto_chains"
brrt uhm.....
no, and not at a computer that can quickly compile and run tests 20:12
if you have a gist i could check it out?
timotimo ah, ok
sure, i can run it and it'll readily explode
brrt but it's a good example of more complex than it might look :-)
timotimo it explodes very early in nqp compilation
brrt hmm
timotimo gist.github.com/timo/90ea1cd5a34f80b76764 20:13
do you see the lack of "yes" outputs? 20:14
brrt opening :-)
yes, i see it 20:17
that is really weird... 20:18
timotimo t.h8.lv/nqp_early_explosion_with_spesh.txt
here's some more spesh so that you can compare BB addresses with the spesh log
the ordering in the code is weird 20:20
in the output, that is
20:26 brrt joined
brrt \o 20:26
emacs just died
20:27 TimToady joined
brrt timotimo: evidently these predecessor arrays are empty for some reason 20:29
that could (potentially) be due to a bug in generating the spesh graph 20:30
but that seems somewhat unlikely though
in fact, the spesh graph output knows all about them 20:31
timotimo that's what confuses the F out of me 20:32
and the "number of preds" should be correct, too
and i've triple-checked that i always use the pidx in a predaray and have num_preds as its bound 20:33
brrt yes, and it is
timotimo and the pred arrays don't alias amongst themselves 20:35
maybe something else is already removing those for some reason 20:36
i shall put some logging into the manipulate function that removes succs and stuff
brrt hmm
it seems unlikely to me tbh
maybe step through it with gdb
to be completely honest, i'm not sure i understand your purpose there 20:37
in this branch
you want to optimize jumplist, how?
timotimo t.h8.lv/nqp_early_explosion_with_spesh.txt - has a bit more info now 20:40
jumplist currently creates a whole bunch of BBs that consist of only a single goto instruction
brrt hmm, and?
timotimo that increases code size
i don't actually know how big a goto is
if you think it's not worth much, i'll just drop it for the time being 20:41
but then i have no good idea what to do next j)
;)
brrt ok. wait a minute :-) 20:42
you want to replace our goto's with what, exactly?
i'm not trying to be mean, i just don't understand it 20:43
anyway, you can say succ[sidx]->pred[succ[sidx]->num_pred] = NULL as succ[sidcx]->pred[k] = NULL; succ[sidx]->num_pred = k-1; 20:54
and i would say just take a pointer to the successor you're looking at :-) 20:55
ok, so your basic way of doing is this 20:56
take a jumplist
all those bbs that simply go to their direct predecessors can be removed
right? but that... will not necessarily ever work, because jumplist depends on a numeric argument, and you're not changing that number, are you? 20:57
integer
20:59 brrt` joined
brrt` uhm, how much of my last rambling actually came through :-) 21:00
also note that the JIT compilation of the jumplist depends on all the basic blocks containing goto's 21:01
and that they have to be aligned, even
jumplist is very much a space for time tradeoff :-) 21:02
brrt oh wow 21:04
timotimo: if you're unsure what to do, i can tell you that deopt bridges would be really beneficial to a): JIT in case of a better code generator (my grant project) and b): spesh trace compilation 21:08
neither necessarily essential for any (no pressure), but both would benefit tremendously 21:09
i'm not entirely sure any of my irc messages are coming through.. :-) 21:12
timotimo sorry
i got a bunch of your messages
want me to gist you what i got?
oooooooooooh; could it be succ[sidx]->pred[succ[sidx]->num_pred] = NULL was out of bounds anyway? 21:13
oh, if the jit compilation of jumplist requires a list of BBs that are all gotos, i'd break it with my "optimization" 21:14
that's not good
thanks for the hint
nwc10 .tell jnthn is there a bug at line 377 of src/6model/containers.c -- should that HASH_ADD_KEYPTR() call be inside the if (!entry) block? 22:22
22:54 quester left