Search
Monday, 14th of January 2019, 7:11:14 UTC
13:10:56
stassats
now how do i serialize lvar uses, pull them through casts? through LETs?
13:11:14
stassats
how do i even know when they're not serialized
13:12:15
stassats
if a lvar has multiple uses then an IF has to be involved, or maybe even an NLE
13:19:09
stassats
hell, found another bug
13:20:57
stassats
and found the cause quickly, good
13:28:23
stassats
where was the random tester looking?
13:30:30
stassats
https://gist.github.com/stassats/f79b0c6fb9b72acfad33e8cf4e84d41d#file-lvar-lisp
13:52:54
pfdietz
The random tester moves in mysterious ways.
13:56:14
stassats
the first one has been there since august, the second since november
13:58:32
stassats
i remember what the m-v-bind thing was optimizing, but not the let thing
13:58:59
stassats
i'm inclined to just revert both changes, as i have no avenues for fixing either
14:00:33
stassats
or, i can handle m-v-bind by using multiple LETs, wonder if that'll be enough to get optimized
14:01:35
pfdietz
Needs to generate more complex m-v-b forms, looks like.
14:02:08
stassats
the problem here is branches and the values produced before the branch is taken
14:02:40
stassats
if i manually substitute the EVAL variables, it's fine
14:02:46
pfdietz
Easy enough to produce that.
14:04:05
stassats
if i can't write a test i should at least include in the commit message the form that gets optimized
14:10:48
stassats
creating lets by hand is not easy
15:04:06
stassats
inserting LETs does fix the bug but defeats the optimization
15:20:04
stassats
and now thinking how to optimize it without breaking anything
16:03:32
stassats
i can use a simple heuristic, are all lvars produced in the same block
18:25:54
stassats
to really solve it i need to be able to answer if C is ever executed between A and B
18:27:20
stassats
i can answer that, but how fast?
18:31:40
stassats
all that to optimize (nth-value 1 (if m (values 1 m) (values nil nil))) into just M
18:59:15
pfdietz
Do you mean: there exists a path from A to B that include C, or that there exists such a path that includes C and does not pass through A and B except at the two ends?
19:00:08
pfdietz
So, would this path qualify: A C A B?
19:04:35
stassats
it's more i have A and C which go to B, are they go straight to B without encountering each other?
19:05:37
stassats
i.e. can they share the same storage
19:07:09
stassats
(let ((a (eval 1)) (b (eval 2))) (if f a b)) can't, while (if f (eval 1) (eval 2)) can
Monday, 14th of January 2019, 19:11:14 UTC