github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm
Set by AlexDaniel on 12 June 2018.
00:30 promote joined 00:32 promote left 00:34 Karasu joined 00:38 Karasu left 00:52 mst_ joined, ChanServ sets mode: +o mst_, p6bannerbot sets mode: +v mst_ 00:57 japhb left, mst left, [Coke] left 00:59 benchable6 left, committable6 left, bisectable6 left, benchable6 joined 01:00 p6bannerbot sets mode: +v benchable6, greppable6 left, statisfiable6 left, nativecallable6 left 01:01 nativecallable6 joined, statisfiable6 joined, greppable6 joined 01:02 p6bannerbot sets mode: +v nativecallable6, p6bannerbot sets mode: +v statisfiable6, p6bannerbot sets mode: +v greppable6 01:04 japhb joined, [Coke] joined, cherryh.freenode.net sets mode: +vv japhb [Coke], p6bannerbot sets mode: +v [Coke], lizmat left 01:05 p6bannerbot sets mode: +v japhb 01:09 leedo joined 01:10 p6bannerbot sets mode: +v leedo
MasterDuke i find it a little annoying that the files generated by tools/update_ops.p6 are in git 01:32
deconflicting two changes to the oplist gets complicated 01:33
01:37 dimi34ka28 joined 01:42 dimi34ka28 left 01:57 bisectable6 joined 01:58 p6bannerbot sets mode: +v bisectable6
MasterDuke woohoo, back to nqp build and passing it's (lightly modified) tests 02:10
and now the same error as before `Stage optimize : Unhandled exception: This type (Scalar) does not support associative operations at SETTING::src/core/Rakudo/Internals.pm6:735 (<ephemeral file>:)`
02:25 regreg left 02:52 balrog24 joined 02:53 balrog24 left 03:05 yoleaux joined 03:06 p6bannerbot sets mode: +v yoleaux 04:02 MasterDuke left 05:39 stmuk joined 05:40 p6bannerbot sets mode: +v stmuk 05:41 stmuk_ left
nine is on his way to Glasgow now 05:49
06:25 ZexaronS joined 06:26 p6bannerbot sets mode: +v ZexaronS
ZexaronS ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ i.redd.it/r2n8a788qs211.jpg ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ 06:26
i.imgur.com/DfZdPTy.jpg ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­
magaimg.net/img/5xpf.jpg ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­
­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ i.imgur.com/AaQg3Pp.jpg ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­
06:26 ZexaronS left 06:42 averell11 joined 06:43 averell11 left
nine Who'd have thought that replacing p6bool with a new hllbool op would cause bootstrap issues? 06:45
07:23 brrt joined 07:24 p6bannerbot sets mode: +v brrt
nine timotimo: Perl6's BOOTSTRAP and metamodel code will always have to explicitly specifiy the language with a hllboolfor which kinda sucks. I don't see a good way around that. 07:26
brrt \o 08:02
nine o/ 08:07
brrt have fun in TPC :-) 08:14
I was reading about the HHVM JIT compiler recently 08:19
and one thing that stood out to me is that they rely heavily on 'side exits' to do uncommon things
Our guards are kind of similar, I think, but I think we could be using them more aggressively 08:20
oh, hang on 08:29
.tell nine I think I prefer a refcount for MVMJitCode; and note that you're using malloc() for the code in MVM_jit_code_copy(), while the original code is using explicitnly allocated on a page (which is marked read-execute, but not read-write-execute) 08:31
yoleaux brrt: I'll pass your message to nine.
timotimo nine: damn, that kinda sucks, though of course you can register a desugar that puts the "for" argument in there for free 08:36
08:37 Schroeder15 joined, Schroeder15 left
nine timotimo: it's not _that_ many places, but instead of a simple pointer read, it's now a hash read to get the config and some dereferences to get the boolean value. 08:39
yoleaux 08:31Z <brrt> nine: I think I prefer a refcount for MVMJitCode; and note that you're using malloc() for the code in MVM_jit_code_copy(), while the original code is using explicitnly allocated on a page (which is marked read-execute, but not read-write-execute)
timotimo except the jit could skip the lookup 08:40
nine Of course, spesh could be made smart enough to optimize it back to that constant value
timotimo since we don't support hll types to change
nine :)
timotimo well, it's a bit more annoying than that, since it'd have a branch in it
but of course we could have an op that just has the two types as arguments
nine oh, indeed 08:41
timotimo the best kind of bool type is a function anyway. True is -> $a, $b { $b } and False is -> $a, $b { $a } ... OSLT :)
nine Looks like the remaining errors I get are all about p6bool handling unconcrete values while my hllbool only handles ints 08:42
and bigints 08:44
brrt that seems tractable :-) 08:45
timotimo if we factor that out, spesh can probably do a better job than p6bool's implementation
brrt nods
nine It's just odd cause as I read it p6bool reads an int64, too
just like my hllbool
brrt btw, I kind of want to start moving the nativecall-JIT towards the expression JIT 08:46
nine It takes an MVM_operand_int64 and is really just GET_REG(tc, 0).o = GET_REG(tc, 2).i64 ? True : False;
timotimo that seems odd 08:47
brrt hmm
that's odd
nine Oh, p6bool is not just a straigt mapping to the op. It consists of quite some NQP code 08:49
timotimo oh, in that case it'd probably already allow spesh to do things well
nine src/vm/moar/Perl6/Ops.nqp:264 08:50
I wonder if all that machinery is really necessary or if it'd be actually better to tailor the calling side. 08:51
timotimo i do believe the callers already try their best to give an int cheaply? 08:54
the after spesh code doesn't look terrible usually 08:55
just that we don't do any box tracking so we could use the source int for if_i/unless_i ops
since p6bool isn't a real boxing, as it only lets 0 and 1 through unmodified and turns everything else into 0 08:56
into 1* 08:57
08:58 brrt left
timotimo maybe we can also skip the whole hllbool thing and instead just use the discover function to set a fact that basically says "this boolifies its argument" 09:01
hllbool will allow us to set the result of p6bool to a correct instance if the input gets known later during the optimization process 09:04
though of course we'd like to skip the whole p6bool -> unbox_i business altogether 09:05
pff, it's always trade-offs, isn't it
nine Well at the very least hllbool will allow for the expr JIT to handle more code 09:06
timotimo well, the more extops we kick out the less necessary it'll become to teach the exprjit to link extop exprtemplates in 09:07
nine I'd guess that we're close enough to that to make exprtemplate support wasted time
timotimo but for the exprjit it's the same, we want the p6bool op to disappear in the spesh stage already 09:08
a very unscientific survey of this one spesh log i happen to have open shows that the only thing that tends to come after a p6bool in a BB is either set, decont, or prepargs + an invoke 09:09
which are things that don't benefit as much from exprjit anyway
nine Ok, got to go offline now. Aircraft doors close. 09:11
timotimo have a pleasant flight!
won't take very long, i expect?
like what, an hour? 09:12
09:13 robertle joined
timotimo though i don't know what airport you're going from 09:13
09:14 p6bannerbot sets mode: +v robertle 09:24 stmuk_ joined 09:25 p6bannerbot sets mode: +v stmuk_ 09:26 stmuk left 09:36 lizmat joined, p6bannerbot sets mode: +v lizmat 09:52 brrt joined 09:53 p6bannerbot sets mode: +v brrt, zakharyas joined 09:54 Kaypie joined, p6bannerbot sets mode: +v zakharyas, p6bannerbot sets mode: +v Kaypie 09:56 Kaiepi left 10:10 elios5 joined 10:12 elios5 left 10:27 lizmat_ joined 10:28 p6bannerbot sets mode: +v lizmat_ 10:30 lizmat left, lizmat_ is now known as lizmat
lizmat and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2018/08/14/...m-glasgow/ 10:30
accu.org/index.php/journals/2535 # interesting read ? 10:31
brrt lizmat++ 10:42
11:01 brrt left 11:24 shareable6 joined 11:25 p6bannerbot sets mode: +v shareable6 11:28 regreg joined 11:29 p6bannerbot sets mode: +v regreg 11:32 lizmat left
nine timotimo: was ~ an hour from VIE to FRA, but still have to take the longer flight 11:41
11:59 wgma20 joined 12:01 wgma20 left
jnthn Ah, FRA, world record holder in corridor length... 12:12
Geth MoarVM: 6217f8262f | (Jonathan Worthington)++ | src/6model/sc.c
Add repossession logging behind a #define

I've added this code in a few times over the years; may as well have it here behind a #define.
12:19
MoarVM: f039e81a6e | (Jonathan Worthington)++ | src/strings/latin1.c
Avoid some code duplication
MoarVM: 0fc1e17ec0 | (Jonathan Worthington)++ | src/strings/ops.c
Add an MVM_UNLIKELY to encoding name init cond

It'll be true once ever per process
12:23 lizmat joined, p6bannerbot sets mode: +v lizmat 12:29 Kaypie left
Geth MoarVM: 8b3210443a | (Jonathan Worthington)++ | src/6model/sc.c
Use #if, not #ifdef
12:30
12:32 regreg left 12:41 regreg joined, p6bannerbot sets mode: +v regreg 12:42 oldschool^24 joined
Geth MoarVM: 9861e8019a | (Jonathan Worthington)++ | 3 files
Make neverrepossess on type apply to the type

You can never repossess a type object - it has no state to change - so we take an attempt to do so as indicating that any instance of the type should never be repossessed.
12:43
12:49 oldschool^24 left 12:52 travis-ci joined, p6bannerbot sets mode: +v travis-ci
travis-ci MoarVM build failed. Jonathan Worthington 'Use #if, not #ifdef' 12:52
travis-ci.org/MoarVM/MoarVM/builds/415897511 github.com/MoarVM/MoarVM/compare/0...3210443a66
12:52 travis-ci left 12:57 Kaiepi joined 12:58 p6bannerbot sets mode: +v Kaiepi 12:59 diakopter left 13:13 diakopter joined, p6bannerbot sets mode: +v diakopter 13:29 brrt joined 13:30 p6bannerbot sets mode: +v brrt 13:38 regreg left
brrt .tell lizmat that part of why I wanted to inline the expression info node was to have better cache line support :-) 13:40
yoleaux brrt: I'll pass your message to lizmat.
13:44 regreg joined 13:45 p6bannerbot sets mode: +v regreg 13:59 lizmat left 14:01 zakharyas left, zakharyas joined 14:02 p6bannerbot sets mode: +v zakharyas 14:06 zakharyas left 14:27 mcintosh19 joined 14:34 mcintosh19 left
Geth MoarVM: 0daf99bcb2 | (Jonathan Worthington)++ | src/spesh/inline.c
Fix inlining of things with multiple `return`s

This doesn't seem to happen in Rakudo or NQP right now at the current inline limit, but potentially a very short regex could have been vulnerable. And when we tweak the inline limiting in the future to account for nested inlines, we'd almost certainly run in to this bug.
14:38
14:40 spirit_pact29 joined 14:41 spirit_pact29 left 14:45 brrt left 15:00 travis-ci joined, p6bannerbot sets mode: +v travis-ci
travis-ci MoarVM build failed. Jonathan Worthington 'Fix inlining of things with multiple `return`s 15:00
travis-ci.org/MoarVM/MoarVM/builds/415949140 github.com/MoarVM/MoarVM/compare/9...af99bcb2c8
15:00 travis-ci left 15:04 elios22 joined, elios22 left 15:19 AlexDaniel` left, AlexDaniel` joined, moon.freenode.net sets mode: +v AlexDaniel`, p6bannerbot sets mode: +v AlexDaniel`
Geth MoarVM/postrelease-opts: 34816c2b8a | (Jonathan Worthington)++ | src/spesh/optimize.c
Optimize "hot" wval lookup into spesh slot access

For a wval that was already accessed, stash it away in a spesh slot and access it that way. This is rather faster, avoiding the various indirections in wval lookup.
15:19
MoarVM/postrelease-opts: 0168eeef85 | (Jonathan Worthington)++ | 5 files
Immediately promote objects ref'd from gen2

When we hit the write barrier, annotate on the object that was being referenced that it was pointed to by a gen2 object. Then, if it is alive at the next GC, immediately promote it to gen2 rather than it having another stay in the nursery.
... (5 more lines)
jnthn Just a rebase :)
15:30 robertle left
jnthn lol, that moment when you optimize so hard that your inline disappears and the dumper gets confused because the start/end of it are at the same place :) 15:34
diakopter poor, poor dumper 15:35
timotimo whoops :) :) 15:36
Geth MoarVM/postrelease-opts: f48747743b | (Jonathan Worthington)++ | 3 files
More aggressive `set` opt of non-deopt inlinees
15:37
MoarVM/postrelease-opts: d93c9c07b6 | (Jonathan Worthington)++ | src/spesh/dump.c
Fix spesh dump for when inline entirely vanishes
jnthn Now `identity` can disappear completely :)
timotimo yes! >:) 15:40
15:41 mst_ is now known as mst
timotimo i wonder if some sinks will also shrink down to just the wval (or possibly getspeshslot) instruction now 15:42
15:47 zakharyas joined
timotimo i wonder if .self should perhaps return what it's called on without deconting 15:47
my super legitimate use case: 15:48
m: .self = 99
camelia Cannot modify an immutable Any ((Any))
in block <unit> at <tmp> line 1
15:48 p6bannerbot sets mode: +v zakharyas
timotimo so i don't have to type $_ :P :P 15:48
jnthn Hm, interesting, seems that latest opt has some fallout 15:57
15:58 brrt joined 15:59 p6bannerbot sets mode: +v brrt
Geth MoarVM/hllbool: 623960c65c | (Stefan Seifert)++ | 2 files
Add true_value and false_value to HLL config for future hllbool op
15:59
MoarVM/hllbool: 5275b0e08c | (Stefan Seifert)++ | 6 files
New hllbool and hllboolfor ops
brrt I was thinking of moving the cleanup of the spesh graph directly into MVM_spesh_inline
timotimo i don't think jnthn gave an opinion on the hllbool idea yet; does it make sense to you, jnthn? 16:02
jnthn I guess it's either that or a sequence of wval/wval/truefalse w(obj) r(int64) r(obj) r(obj) 16:04
We can spesh it into whatever we want either way and the first is more compact bytecode 16:05
16:05 regreg left 16:06 zakharyas left
nine Btw. it successfully slows down setting compilation by ~50 %. I guess it's because of the hash access by those hllboolfor in the meta model and bootstrap code. So now I need to teach the JIT to recover that. 16:10
brrt :-)
timotimo hm, if the frame that inlines an operation that has an hll set in it, like hllboolfor, it should check if the inlining frame has the right hll and turn that into an hllbool :) 16:18
brrt rewriting code is hard 16:21
timotimo 'tis 16:23
16:24 lucasb joined 16:25 p6bannerbot sets mode: +v lucasb
nine timotimo: that's...an excellent idea I dare say 16:31
Unless JITing hllboolfor is somewhat easy. Then it's still an excellent idea but may just not be worth it 16:32
timotimo jitting should be super easy, we should be able to just refer to the objects themselves, unless hlls and objects in them can move? 16:33
but even then, we can use a spesh slot to refer to the HLL itself
and with add_spesh_slot_try_reuse we'll be only adding it once per spesh graph
if we look across the inliner's spesh slots rather than the inlinee's spesh slots at that point 16:34
which is worth a check i think
16:49 robertle joined 16:50 p6bannerbot sets mode: +v robertle 16:56 brrt left 17:10 danzilio1 joined 17:12 AlexDaniel left 17:13 danzilio1 left 17:14 Dwarf7 joined 17:16 Dwarf7 left
timotimo incredible optimization opportunity! a frame that sets up a bunch of constants, some are run-time-calculated *each time* with bor_i ops! three bor_i ops that could have been left out! all we have to do in return is write a compile-time evaluator for spesh! 17:19
17:26 lizmat joined 17:27 p6bannerbot sets mode: +v lizmat
diakopter timotimo: 🤣🤣🤣🤣🤣🤣🤣 17:34
Geth MoarVM: da9123a76a | (Jonathan Worthington)++ | src/spesh/plugin.c
Only mark stolen deopt ann used if it is

Otherwise, we can end up never placing it on an inserted guard, which may in turn cause it to appear like that deopt index is not being used, and thus lead to incorrect instruction deletion and a crash on deopt.
17:43
17:43 AlexDaniel joined, p6bannerbot sets mode: +v AlexDaniel 17:45 lucasb left
jnthn The need for that fix was uncovered by the latest commit in postrelease-opts, but since it could potentially afflict things in master that we just didn't notice yet, I put it there also 17:45
17:47 lizmat left 18:01 Soni16 joined 18:04 Kaiepi left, travis-ci joined, p6bannerbot sets mode: +v travis-ci
travis-ci MoarVM build failed. Jonathan Worthington 'Only mark stolen deopt ann used if it is 18:04
travis-ci.org/MoarVM/MoarVM/builds/416026990 github.com/MoarVM/MoarVM/compare/0...9123a76a7f
18:04 travis-ci left 18:05 brrt joined 18:06 p6bannerbot sets mode: +v brrt 18:08 Soni16 left 18:25 Guest31157 joined 18:29 Guest31157 left 18:37 metax joined, metax left
brrt timotimo: the totally practical way to do this, btw, is to write a small frame with the operation you want constant-foleded, interpret it, and evaluate the result 18:43
I mean, not only that, that's basically the standard way of doing it :-)
18:57 jpX joined
timotimo oh, really now? 18:58
can't we jit that frame? :D
19:00 jpX left 19:08 ski777715 joined 19:13 ski777715 left 19:19 committable6 joined, p6bannerbot sets mode: +v committable6 19:25 zakharyas joined, p6bannerbot sets mode: +v zakharyas 19:45 colomon left 20:05 Kaiepi joined 20:06 p6bannerbot sets mode: +v Kaiepi 20:12 barq6 joined 20:16 barq6 left 20:31 zakharyas left 20:37 lizmat joined 20:38 p6bannerbot sets mode: +v lizmat 20:42 brrt left 20:51 mrkirby1538 joined 20:53 mrkirby1538 left
timotimo i've got a patch that puts the "null"s at the beginning of a frame in ascending rather than descending register order 20:55
i'd assume typical prefetching patterns/methods would make that barely but surely faster 20:56
20:57 JSharp18 joined 20:59 JSharp18 left
jnthn Presumably :) 21:17
21:18 regreg joined
timotimo oh, since all the usage stuff is now all better, maybe i should try cutting down the duplicate versions in PHI nodes 21:19
21:19 p6bannerbot sets mode: +v regreg
jnthn timotimo: Yeah, have a go, but in a branch please... :) 21:22
Want to minimize risk for the next release :)
timotimo sure 21:30
but maybe i'll concentrate on getting the first public version of the profiler tool out the door
jnthn Yes! :) 21:35
timotimo i kind of wish we had "proper" filenames and line numbers for more genned files than just the core setting; is it just a thing that would have to be ported to nqp from rakudo? 21:47
21:48 diakopter left
timotimo i think i'm looking at a --profile-compile right now, because there's lots of code parsing in there; BOOTSTRAP.nqp, Perl6-Grammar.nqp, World.nqp, i cannot generate links to any of those :( 21:48
22:23 Kaiepi left 22:27 Kaiepi joined 22:28 p6bannerbot sets mode: +v Kaiepi 22:43 regreg left, justache10 joined 22:45 justache10 left 23:09 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke 23:10 MasterDuke left, MasterDuke joined, herbert.freenode.net sets mode: +v MasterDuke, p6bannerbot sets mode: +v MasterDuke 23:31 regreg joined 23:32 p6bannerbot sets mode: +v regreg 23:56 cheapie10 joined 23:57 cheapie10 left