Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2015-08-17

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:14 lizmat joined #moarvm
01:19 oetiker joined #moarvm
03:28 ShimmerFairy joined #moarvm
06:14 rurban_ joined #moarvm
06:52 zakharyas joined #moarvm
07:16 brrt joined #moarvm
07:16 brrt damnit, after my post yesterday i realised i've been doing best-rule calculcation wrong
07:17 brrt and that i've no easy cheap way to fix it
07:34 FROGGS joined #moarvm
07:52 brrt or maybe that i do have a way to fix it, but it's complex
08:14 TimToady the perfect is the enemy of the good?  or was it the other way around...  :)
08:31 brrt the animosity is mutual
08:31 brrt but, i'd argue, this is a bit of an epic screwup
08:39 brrt the basic problem is that in calculating the best rule given a ruleset for a given nonterminal symbol, i don't take the rules that generate its referent nonterminal symbols into account
08:40 brrt which means the code generator should always choose the 'cheapest' rule on a local sense, meaning it disregards all the tree information, meaning it generates sucky code :-(
08:53 dalek MoarVM/even-moar-jit: 7efe6d8 | brrt++ | / (14 files):
08:53 dalek MoarVM/even-moar-jit: Organise architecture-specific files
08:53 dalek MoarVM/even-moar-jit:
08:53 dalek MoarVM/even-moar-jit: Provide preprocessor definitions in config.h to enable header
08:53 dalek MoarVM/even-moar-jit: file selection. All x64-specific files go into their own directory.
08:53 dalek MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/7efe6d8512
08:54 brrt and the important corollary of my lament is that it doesn't have to, i just need to figure out how to calculate the real cost of a rule
08:55 brrt given a ruleset, implying certain child rulesets, etc
08:55 TimToady just borrow Deep Blue
08:56 TimToady and teach it about CPUs instead of chessboards...
08:57 brrt i think that's called superoptimization, and it's awesome
08:57 brrt but not very suited for just-in-time
09:21 jnthn Who'da thunk JIT compilation would be so full of funky problems... :)
09:22 dalek MoarVM/even-moar-jit: 45b6314 | brrt++ | / (4 files):
09:22 dalek MoarVM/even-moar-jit: Move architecture definitions to header
09:22 dalek MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/45b6314f14
09:22 brrt well, ehm.... i kind of had expected a bit less :-)
09:23 jnthn :)
09:24 brrt but i guess that was pretty naive
09:29 brrt you know what's also naive? an architecture-independent register allocator
09:46 FROGGS_ joined #moarvm
11:10 rurban_ joined #moarvm
11:38 Ven joined #moarvm
12:01 Ven joined #moarvm
12:30 brrt joined #moarvm
12:33 brrt \o
12:38 JimmyZ o/
12:50 brrt ok, i checked it out, and the minimum-cost table is wrong
12:50 brrt which is... not life-shattering, but really annoying
12:51 zakharyas joined #moarvm
12:59 dalek MoarVM/even-moar-jit: aa5b4a9 | brrt++ | tools/tiler-table-generator.pl:
12:59 dalek MoarVM/even-moar-jit: Dump minimum-cost table
12:59 dalek MoarVM/even-moar-jit:
12:59 dalek MoarVM/even-moar-jit: Visual inspection confirms my supsicion that the current optimum
12:59 dalek MoarVM/even-moar-jit: cost calculation algorihtm is way to simplistic, which I'd expect
12:59 dalek MoarVM/even-moar-jit: because it doesn't take implied costs into account. So that will
12:59 dalek MoarVM/even-moar-jit: require some calibration
12:59 dalek MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/aa5b4a928a
13:38 lizmat_ joined #moarvm
13:42 brrt now what...
13:44 brrt for some reason ARGLIST doesn't end up in the tile table, but i'm fairly sure we're writing rulesets for it alright
13:45 brrt and now i know why
13:45 Ven joined #moarvm
13:47 brrt regexes, they are a powertool
14:08 Ven joined #moarvm
15:13 brrt joined #moarvm
15:22 Ven joined #moarvm
15:37 FROGGS o/
15:41 hoelzro greetings FROGGS
15:41 Ven joined #moarvm
16:14 brrt joined #moarvm
17:16 dalek MoarVM/even-moar-jit: f871cdf | brrt++ | / (7 files):
17:16 dalek MoarVM/even-moar-jit: Fix tiling so that we almost work through NQP
17:16 dalek MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/f871cdffba
17:17 brrt seems like i'll need a special if-void node type
17:17 * brrt afk &
17:31 [Coke] brrt++
17:40 lizmat joined #moarvm
18:00 rurban_ joined #moarvm
18:11 jnthn "almsot work through NQP" sounds like nice progress :)
18:14 colomon joined #moarvm
18:19 zakharyas joined #moarvm
19:00 lizmat joined #moarvm
19:21 brrt joined #moarvm
19:28 brrt \o/ we pass make test
19:28 brrt (for nqp)
19:29 jnthn brrt: With le new JIT? :)
19:29 brrt the tiling part, yes :-)
19:29 jnthn Aha, OK :)
19:29 jnthn So a few more steps until it's doing the code-gen from the tiles?
19:30 brrt yes
19:31 brrt there are two major difficulties left: one is register allocation (on the todo list since... ehm, early july i think) and one is branches, which isn't difficult conceptually but technically
19:31 brrt and before we're really, really done, we need to add throwish and invokish in the mix, but that is conceptually quite simple and can mostly be copied from the old JIT
19:32 brrt and then there is the issue of the minimum-cost table i talked about this morning
19:33 dalek MoarVM/even-moar-jit: 76a03fd | brrt++ | src/jit/ (6 files):
19:33 dalek MoarVM/even-moar-jit: Add EITHER node to disambiguate from void IF
19:33 dalek MoarVM/even-moar-jit:
19:33 dalek MoarVM/even-moar-jit: We can generate tiles for void IF just fine, but we can't disambiguate
19:33 dalek MoarVM/even-moar-jit: them for ambiguous tiles (CALL), so it's better to have a special void
19:33 dalek MoarVM/even-moar-jit: IF node which is now called EITHER.
19:33 dalek MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/76a03fd0b9
19:34 brrt jnthn: fwiw, i can state the problem this way: suppose i have a ruleset and a nonterminal, what's the best rule in the ruleset to implement that nonterminal?
19:34 brrt my current implementation says: the cheapest rule that generates the desired nonterminal
19:35 brrt but this disregards the information in the ruleset; because we have the ruleset we know something of the cost of the tiles it refers to
19:36 brrt simplest possible case: (add reg reg) and (add reg (load mem)); the register-register addition is cheaper because it doesn't require a load from memory; but the only case we'll ever see these rules combined is when the load-from-memory is necessary anyway
19:36 brrt so the fact that they're together implies that the cost of (add reg reg) is really (load mem) + (add reg reg)
19:37 brrt see.. what i mean? :-)
19:38 brrt i need to add the implied costs into the rule given the ruleset
19:39 brrt and i think... it's possible inverting the trie might just work
19:39 jnthn Hm, so the costs are not so static :)
19:40 brrt well, i treat them as static at compile time. it's just that the tree information *implied in the ruleset state* should at least be calculated :-)
20:28 rurban_ joined #moarvm
20:59 dalek MoarVM/even-moar-jit: 2390e0a | brrt++ | / (3 files):
20:59 dalek MoarVM/even-moar-jit: Add tile logging, fix conflict resolution bug
20:59 dalek MoarVM/even-moar-jit:
20:59 dalek MoarVM/even-moar-jit: Note to self: either change the names of MVMJitExprOpInfo and
20:59 dalek MoarVM/even-moar-jit: MVMJitExprNodeInfo to be more distinguished, or renember what
20:59 dalek MoarVM/even-moar-jit: they stand for.
20:59 dalek MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/2390e0ab39
22:13 TEttinger joined #moarvm

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary