freenode/#sbcl - IRC Chatlog
Search
13:50:59
stassats
removing (eq (functional-kind (block-home-lambda block)) :deleted) doesn't work, i wonder why
13:53:31
stassats
it fails in find-dfo, but shouldn't it just become unreachable, or is it coming through nlxes or something?
13:55:00
stassats
and it was me who inserted that check into find-dfo, can't ask anyone or consult git blame any further...
14:14:40
stassats
ok then, but component-head->succ are only NLXes and non-tail-called functions, not very good at catching unused stuff
14:30:21
stassats
so the job of eliminate-dead-code is simply to purge component-head->succ of dead blocks
14:39:08
stassats
so what if delete-lambda just unliks itself from there, then something similar for nlx
15:39:42
pfdietz
I'm going to try to modify the random form generator to make non-integer forms for "top level" forms (those whose return values end up being returned rather than being fed into arithmetic operator.) Maybe that would have caught this.
15:40:55
stassats
my modified test case crashed the compiler, so don't even need to check the result
15:47:31
pfdietz
Hypothesis (a test framework in Python) takes a different approach: instead of simplifying the generated form, it mutates the sequence of random bits fed to the generator. This ensures that correct-by-construction is maintained.
16:43:26
stassats
but it's probably useless, a lot of places check if the lambda of a node is deleted
18:03:19
stassats
jumping into LETs is safe, but not functions, so I don't have anything to worry about along that path
22:43:56
karlosz
it would be interesting if we could lift some of those tricks - phase ordering in an SSAified IR1 was explored in depth
23:14:21
karlosz
here are the notes if anyone is interested. it was done as part of gwydion http://www.cs.cmu.edu/afs/cs/project/gwydion/hackers/ram/notes/notes.txt
23:15:29
karlosz
an interesting point he brings up is that since BINDs represent aggregate binding of all lambda vars its hard to optimize/eliminate only some of them
23:15:54
karlosz
stassats: phi as in the classic phi functions used in SSA, well documented in the literature
23:19:16
karlosz
my understanding was this was next on the list for compiler changes in CMUCL circa 1993 before the implementors were tasked to work on gwydion instead
23:20:29
karlosz
i'm frankly amazed that ram was able to write and hold the entire compiler all in his head so im looking to see if there are any obvious wins we can get from reading the notes
23:23:19
karlosz
right, that's why reading CMUCL (though much more buggy) helps a lot with understanding python, since its well documented
23:27:06
karlosz
okay, so for the block compile stuff (which would use compile-file), i should make a new impure-cload test and then check for the presence of one code component
23:28:17
karlosz
do you have any ideas for how i can test that two defuns get block compiled into one component?
23:30:24
stassats
i can't find good compiler literature where i'm neither bored, nor it's over my head
23:33:24
karlosz
the loop optimization section would be of particular interest since we don't have any of those optimizations in Pytho
23:33:46
karlosz
loop induction analysis would buy us a lot in terms of getting rid of bounds checks and stuff
23:50:59
karlosz
part of python 2 was breaking up lambda cause lambda does too much. for example, bind in v2 is a bunch of smaller nodes which handles each var individually
0:14:10
karlosz
to be honest i don't understand the point of *free-vars* anymore now that we store that kind of stuff in info
0:39:03
karlosz
most of the stuff has not been done yet but there is like 5% of it done like having NODE-ASSERTED-TYPES