github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm
Set by AlexDaniel on 12 June 2018.
00:38 melamoMn joined 00:39 p6bannerbot sets mode: +v melamoMn 00:45 melamoMn left
MasterDuke blog.anp.lol/rust/2018/09/29/lolbench/ "automagically and empirically discovering Rust performance regressions", looks like a nice setup 01:00
01:23 MasterDuke left 01:28 B3NJAMIN joined, B3NJAMIN left 01:40 ZzZombo left 02:23 ZzZombo joined, p6bannerbot sets mode: +v ZzZombo 02:26 pocketprotectorJ joined, pocketprotectorJ left 02:32 MSHughes joined 02:33 p6bannerbot sets mode: +v MSHughes 02:44 MSHughes left 03:40 heinrich5991KZ joined 03:41 p6bannerbot sets mode: +v heinrich5991KZ 03:42 heinrich5991KZ left 04:25 AlexDaniel left 06:06 brrt joined 06:07 fake_space_whale left, p6bannerbot sets mode: +v brrt 06:10 domidumont joined 06:11 p6bannerbot sets mode: +v domidumont
brrt \o 06:26
nwc10 o/ 06:28
brrt I need to merge the bitshift work... 06:29
06:51 btree joined, p6bannerbot sets mode: +v btree 06:56 btree left 06:57 robertle left 07:14 patrickb joined, p6bannerbot sets mode: +v patrickb 07:46 MaverickWT joined, Unterd0ghJ joined 07:47 p6bannerbot sets mode: +v Unterd0ghJ 07:49 MaverickWT left 07:53 Unterd0ghJ left
timotimo jnthn: any reason why "eliminate_pointless_gotos" can't move to after the post_inline_pass? 08:46
ah, merge_bbs benefits from it 08:47
before: 08:48
Frame size: 850 bytes (722 from inlined frames)
after:
Frame size: 806 bytes (678 from inlined frames)
m: say 850 - 722; say 806 - 678;
camelia 128
128
timotimo right.
m: say 722 - 678
camelia 44
jnthn How'd you get that? :) 08:50
timotimo your optimization for takedispatcher was incomplete ;)
it replaced the takedispatcher op with null, but nothing after that looked at the instruction to set the "known type" fact 08:51
and the post_inline pass didn't look at isnull instructions, neither did it look at if_i or unless_i
jnthn Uh, yeah, you can't optimize much inside inlines at the moment :)
timotimo and then for good measure i also added "eliminate_pointless_gotos" after it, and i could also "merge_bbs" again
jnthn Because there's no information on what is retained for deopt available 08:52
So the chances of screwing things up is very high.
timotimo i'll create a PR for the changes, i suppose?
jnthn Yeah, but I'm going to reject it on principle in the immediate.
timotimo right. if it does stay open, though, discussion can take place 08:53
jnthn Or well, defer it until we have the things needed to do it safely.
Right.
timotimo and it won't fall through the cracks
jnthn But I really don't want things going into spesh that I know are vulnerable to causing weird deopt bugs.
(Yes, it's pretty high on my list to retain enough information to let us do things like this safely.) 08:54
timotimo aye
Geth MoarVM/better_takedispatcher_opt: d857e7a59a | (Timo Paulssen)++ | 2 files
set and use facts on eliminated takedispatcher
08:56
MoarVM/better_takedispatcher_opt: f01dba6da1 | (Timo Paulssen)++ | src/spesh/optimize.c
opt out if_i, unless_i and pointless gotos post inline
jnthn fwiw, I think the better approah on this will be to do a normal optimize_bb pass on the inlinee - when we're got to the point where we can do it safely 08:57
Geth MoarVM: timo++ created pull request #979:
Better takedispatcher opt
08:58
timotimo here's the PR including a snippet of our discussion
09:01 h4p_fF joined, h4p_fF left
timotimo yeah, spec tests give me a test that sometimes does MoarVM oops: Spesh: failed to fix up inline 0 (last) 552 -1 09:07
09:41 Z-moduleTF joined 09:42 p6bannerbot sets mode: +v Z-moduleTF 09:48 Z-moduleTF left 09:58 brrt left 10:00 zakharyas joined 10:01 p6bannerbot sets mode: +v zakharyas 10:03 ZzZombo left 10:17 zakharyas left 10:18 zakharyas joined, p6bannerbot sets mode: +v zakharyas 10:35 zakharyas left 10:37 zakharyas joined, p6bannerbot sets mode: +v zakharyas 10:43 brrt joined 10:44 p6bannerbot sets mode: +v brrt 10:48 brrt left 11:06 zakharyas left 11:08 zakharyas joined, p6bannerbot sets mode: +v zakharyas 11:26 zakharyas left 11:28 zakharyas joined, p6bannerbot sets mode: +v zakharyas 11:47 Whovian9369cb joined, Whovian9369cb left 11:48 ZzZombo joined, p6bannerbot sets mode: +v ZzZombo 11:54 rmkfE joined, rmkfE left 12:01 brrt joined 12:02 p6bannerbot sets mode: +v brrt 12:03 zakharyas left 12:07 zakharyas joined 12:08 p6bannerbot sets mode: +v zakharyas 12:11 robertle joined 12:12 p6bannerbot sets mode: +v robertle
jnthn brrt: One more cases of the negative label thing just got reported 12:12
m: my $a = ('a' x 200).comb; $a ~~ s:g/<ws>//
camelia ( no output )
jnthn m: my $a = ('a' x 200).comb; $a ~~ s:g/<ws>// 12:13
camelia JIT ERROR: Negative offset for dynamic label 32
jnthn There :)
brrt yeah, I have a good hypothesis
thanks :-)
12:15 AlexDaniel joined 12:16 p6bannerbot sets mode: +v AlexDaniel 12:37 sharkboy joined 12:38 p6bannerbot sets mode: +v sharkboy 12:42 sharkboy left 13:02 zakharyas left
brrt grumbles because adding a 'noop template' isn't so simple as I thought it'd be 13:55
Geth MoarVM: 271e613f4f | (Jonathan Worthington)++ | src/spesh/plugin.c
Fix a leak in spesh plugin optimization
13:59
14:06 lizmat left, lizmat joined, p6bannerbot sets mode: +v lizmat, lizmat left 14:10 oojacoboo joined, p6bannerbot sets mode: +v oojacoboo 14:17 oojacoboo left 14:18 lizmat joined, p6bannerbot sets mode: +v lizmat 14:25 mrquincy joined 14:26 mrquincy left 14:29 zakharyas joined, p6bannerbot sets mode: +v zakharyas
Geth MoarVM: ecbc1295ae | (Jonathan Worthington)++ | src/spesh/optimize.c
Fix compiler stub test in call optimization

So we bail out if we see one. Otherwise, we can end up with the high level code object being used with a fastinvoke, which expects a low level code object, and then explodes.
14:54
15:00 brrt left 15:03 fake_space_whale joined
Geth MoarVM/pea: 82a8650f06 | (Jonathan Worthington)++ | 12 files
Minimal escape analysis and scalar replacement

This only handles the case where:
  * No aliasing
  * No deoptimizing instructions
  * No control flow (conditionals, loops)
... (7 more lines)
15:03
15:03 zakharyas left
Geth MoarVM/pea: 3835915167 | (Carl Masak)++ (committed by Jonathan Worthington) | src/spesh/manipulate.c
Add missing comment to a new function
15:03
MoarVM/pea: f93d75ba45 | (Jonathan Worthington)++ | src/spesh/pea.c
Handle int64, num64, and str attributes in PEA
jnthn Le rebase :)
15:04 p6bannerbot sets mode: +v fake_space_whale 15:07 zakharyas joined 15:08 p6bannerbot sets mode: +v zakharyas 15:14 albttxJN joined 15:15 domidumont left, p6bannerbot sets mode: +v albttxJN 15:20 albttxJN left 15:30 patrickb left 15:41 arbitraryuseriz joined 15:44 arbitraryuseriz left 15:53 brrt joined 15:54 p6bannerbot sets mode: +v brrt 15:56 Sigyn left 15:57 Sigyn joined, p6bannerbot sets mode: +v Sigyn 16:04 fake_space_whale left, zakharyas left
Geth MoarVM/pea: 69b813819a | (Jonathan Worthington)++ | 2 files
Introduce irreplaceable flag for allocations

Which indicates that we can't currently scalar replace them. In the future, we will often be able to just materialize the object at that point in time, if it makes sense to do so. For now, this means we can start to liberalize things a little bit. The most immediate way is to not bail the whole analysis just because one tracked allocation cannot be scalar replaced.
Additionally, properly handle PHIs that sneak in mid-block (due to other opts) and the argument to an object attribute bind.
16:05
MoarVM/pea: 40844daa11 | (Jonathan Worthington)++ | 2 files
Slightly liberalize handling of deopt in PEA
16:21
16:25 lizmat left 16:38 zakharyas joined 16:39 p6bannerbot sets mode: +v zakharyas 16:43 lizmat joined, p6bannerbot sets mode: +v lizmat 17:03 vdamewood joined 17:06 vdamewood left 17:20 spudlyEm joined 17:24 spudlyEm left 17:27 patrickb joined 17:28 p6bannerbot sets mode: +v patrickb 17:32 avar left 17:33 avar joined, avar left, avar joined, p6bannerbot sets mode: +v avar 17:34 p6bannerbot sets mode: +v avar 17:50 brrt left 18:01 npopeWU joined 18:02 p6bannerbot sets mode: +v npopeWU 18:03 npopeWU left 18:34 stylewarningbH joined 18:35 p6bannerbot sets mode: +v stylewarningbH 18:39 stylewarningbH left 18:41 mtom joined, mtom left 18:54 jmorgan1lv joined 18:58 jmorgan1lv left 18:59 fbsxM joined 19:00 zakharyas left, p6bannerbot sets mode: +v fbsxM 19:02 fbsxM left 19:11 brrt joined 19:12 p6bannerbot sets mode: +v brrt 19:28 breadcorn joined 19:29 p6bannerbot sets mode: +v breadcorn 19:35 breadcorn left
brrt I think I fixed the bug 19:48
AlexDaniel what about this one? :) github.com/rakudo/rakudo/issues/2340 19:51
brrt yeah, that one 19:53
don't panic, that was always a bug, it's just that now, I know about it :-)
19:56 michaelroseYZ joined
AlexDaniel ok :) 19:58
20:01 michaelroseYZ left
timotimo , 20:03
,,
i'm sorry 20:04
the cat forced me to do this
Geth MoarVM: ceea63332b | (Bart Wiegmans)++ | 2 files
[JIT] Do not skip adding labels to PHI nodes

In some circumstances, apparently we can end up with PHI nodes with labels on them that are not at the start of the tree. These labels would be allocated but not emitted, which would (in this case) lead to incorrect exception handler bounds.
DynASM reported this but this (exceptional and very wrong) condition was previously being logged only to the JIT log, where nobody ever saw it. When I changed it to stderr, reports came in, and now it's fixed.
20:19
jnthn ooh, I wonder if this one could be why deopt for the JIT got -1's sometimes or some such 20:23
brrt possibly
yes
not 100% certainty, but possibly
timotimo jnthn: how far along are we towards "put deopt targets earlier if only pure ops are in front of it"?
20:24 nativecallable6 joined, p6bannerbot sets mode: +v nativecallable6
jnthn It's not very high on my todo list at the moment; the existing work to improve precision has already cut out an awful lot of the deopt leftbehinds that we could eliminate, and guard elimination some more... 20:25
timotimo that's cool, good to hear
jnthn So I'm not sure relative to its complexity that it'll be a big win 20:26
timotimo that's fair. maybe i can at some point come up with a metric or visualization of some kind
jnthn Yeah, it'd be interesting to know if my gut feeling is off. Of course, I've also only looked at a small sample of all the spesh output :) 20:27
timotimo sure, sure
20:31 patrickb left 20:51 brrt left
lizmat decommute& 21:10
21:11 lizmat left 21:38 Butterfly^UN joined 21:39 Butterfly^UN left 21:49 Kaiepi left 21:50 Kaiepi joined 21:51 p6bannerbot sets mode: +v Kaiepi 22:14 fake_space_whale joined 22:15 p6bannerbot sets mode: +v fake_space_whale, emberquill joined 22:16 p6bannerbot sets mode: +v emberquill 22:20 landonfie joined 22:21 p6bannerbot sets mode: +v landonfie 22:23 emberquill left 22:25 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke, landonfie left, MasterDuke left, MasterDuke joined, herbert.freenode.net sets mode: +v MasterDuke, p6bannerbot sets mode: +v MasterDuke 22:45 zleapIs joined 22:51 zleapIs left