timotimo double inline across the sky 01:40
what does it mean?!
01:46 FROGGS joined 08:58 Util joined, rurban_ joined, lue joined, harrow joined, japhb_ joined, tokuhirom joined, flussence joined, timotimo joined 09:01 hoelzro joined, retupmoca joined, TimToady joined 09:04 Util joined, lue joined 10:23 FROGGS[mobile] joined
dalek arVM/inline: dc0e7f5 | jnthn++ | src/core/interp.h:
Correct operand_type_mask.
10:58
arVM/inline: c6b668c | jnthn++ | src/spesh/ (2 files):
Handle spesh slot type in graph/codegen.
arVM/inline: a790bd8 | jnthn++ | src/spesh/inline.c:
For now, don't inline things with handlers.

We'll support it later, but it's easier to add features to a working inliner, so try to get there first.
arVM/inline: d7b5678 | jnthn++ | src/spesh/candidate. (2 files):
Start storing local/lexical count per candidate.

This means we can support frame size varying by spesh candidate, since different candidates may inline differently.
11:14
arVM/inline: 8f6e997 | jnthn++ | src/spesh/graph.c:
Use candidate local/lexical counts in inline graph
jnthn hm, need to sum the deopt tables too... :) 11:30
Deopt is gonna be the "argh my brain argh" part of this branch :)
dalek arVM/inline: 64c2e79 | jnthn++ | src/spesh/inline.c:
Start re-writing deopt idxs, merging deopt table.
11:55
jnthn Well, now I have something that can do the graph merging part of inlining that survives the NQP build and test suite. 11:58
Explodes in Perl 6, unfortunately.
Oh...because we inline something that uses an extop that isn't available in the inline target. OK. 11:59
Can inline run (cuid_24_1402142055.67217) into !protoregex (cuid_53_1402142055.67217) 12:00
Can inline states (cuid_5_1402142055.67217) into !protoregex (cuid_53_1402142055.67217)
Those are quite cool seeing in the debug trace.
(Tells us that every protoregex invocation is potentially going to get 2 calls cheaper) 12:01
timotimo that is way cool indeed. 12:59
dalek arVM/inline: 98d352e | jnthn++ | src/core/frame.c:
Refactor invocation to cope with inlining.

A given static frame may now have different actual frame memory needs depending on if a spesh candidate has inlined other frames. Here, the spesh logic is moved to the start of invocation, and frame allocation is factored out and driven by what's needed. Can further optimize this later on; for now, it's enough to hopefully lay the foundation for the rest of basic inlining.
13:05
jnthn Amazingly, that re-org seems to have Just Worked. 13:07
OK, now for re-writing calls and returns into gotos... 13:08
oh...before that... 13:09
timotimo and after that, a whole bunch of optimizations ought to happen :3 13:17
jnthn Well, remember I've still got to do de-opt, and there's a bunch of cases we can't inline yet, and so forth. 13:18
Still plnety of work to go.
deopt of inlines is hard work 13:19
Because you've got to on-the-fly re-create the frames you optimzied away.
timotimo mhh 13:21
dalek arVM/inline: 82359a2 | jnthn++ | src/spesh/graph.c:
Make invoke/return end a basic block.

They didn't originally, as they are not local flow control transfers. However, when we inline, invokes and returns become gotos. While we could at that point go splitting up the basic blocks, there's a lot of potential to get it wrong. So just construct a graph that is inline friendly from the start.
13:34
13:49 cognominal joined
jnthn OK, now for the fiddly graph re-writes.... 14:01
nwc10 jnthn: at d0369eb0e5b3e91842d5482ffe9c73f2cc4a2799 the NQP build broke. Not yet retested with your commits from today, so might be not-news 14:29
sun is out, hammock is up
jnthn nwc10: Yes, it will have; various things had to catch up with the change. 14:32
(latest works)
nwc10 jnthn: "we have normality" 14:53
t/spec/S17-lowlevel/lock.rakudo.moar fails under ASAN
t/spec/S32-io/IO-Socket-Async.t fails with a parallel test, but passes when re-run
so, like yesterday on master
not broken yet - try harder :-) 14:54
jnthn Yeah, working on re-writing calls/returns into gotos :P 14:55
14:56 vendethiel joined
nwc10 what would Dijkstra say? :-) 14:56
jnthn "You'd better be writing a compiler"? :-P 14:57
15:32 zakharyas joined 15:51 brrt joined
TimToady remembers fondly the design meetings where we talked about deoptimzation, but figured no one would be smart enough or insane enough to take that approach. :) 15:51
brrt many people are insane enough these days 15:52
TimToady is glad for that
the state of the art in insanity has progressed over the last decade or so :) 15:53
brrt i'd say
TimToady so we mostly tried to concentrate on inlineables that were a sure thing (like them protos) 15:56
brrt is happy about commit 82359a2
16:02 vendethiel joined 16:36 btyler joined
brrt rakudo clean make in 1m20s 16:41
wow
16:44 brrt joined 17:58 vendethiel joined 18:40 FROGGS joined 19:16 btyler joined 19:26 btyler joined
timotimo brrt, that's with your new computer? 20:56
22:17 lizmat_ joined
jnthn returns, with stout-enhanced insanity :) 22:27
dalek arVM/inline: 9a93ead | jnthn++ | src/spesh/ (3 files):
Move out logic for inserting a goto.

Allows it to be used more widely; part of the inline logic wants it.
22:46
arVM/inline: 91f9e91 | jnthn++ | src/spesh/inline. (2 files):
Start fleshing out rewrite of return in inline.

Many missing cases to fill out, but captures the overall process.
23:20
jnthn OK, enough for tonight...will finish the return rewrite tomorrow, then work on invoke -> goto, then take on the deopt... :) 23:22
'night