freenode/#sicl - IRC Chatlog
Search
22:48:44
karlosz
even just inferring how many values local functions return would be really helpful for better calling conventions
22:50:49
karlosz
this section of the manual of cmucl (which is missing in sbcl) has a list of all the optimizations i think should at least be present in SICL: https://common-lisp.net/project/cmucl/downloads/doc/cmu-user-2010-05-03/compiler-hint.html
22:51:38
Bike
in the mirtype branch i want to make all the datum types values types and then use that to fix the slowdown so that branch can be merged and we can move closer to good inference
22:54:46
karlosz
Bike: have you read the CMU CL section i linked before? i just found out it has a great explanation of the if-if optimization and a bunch of other stuff
22:56:49
karlosz
i wish i knew about this document sooner; it has literally everything i had to figure out from looking at source code
22:58:55
karlosz
5.3.3 (global function type inference) has the stuff heisig was talking about with deducing the type of a function automatically from its definition
22:59:36
Bike
mm, the fact it's just a flag is... i mean, i've been wondering how to handle the redefinition problem forever now
22:59:49
Bike
the snippets thing would help, but that's a lot of work just to get to where sbcl already is
23:00:01
karlosz
it's still not as powerful as a real type deriver, which actually has to be handwritten, since humans know more about math and stuff
23:02:11
Bike
yeah. i was thinking in mirtype i could shortcut some of the values stuff by doing something similar to how single values were distinguished before, but like, that's a lot of work just to avoid doing other better work
23:02:44
karlosz
like if you could integrate SSAing of lexical variables into the Python framework that would be huge for code with setq and loop analyses
23:04:25
karlosz
also 5.3.5 has this really cool optimization i hadn't seen before and also makes it clear why EQL constraints exist
23:19:04
karlosz
where you can turn (or null structure) tests into just a type test against nil in many situations
23:19:36
karlosz
i think the bar we should try to clear is like the last example given in 5.3.6, where that function has NO type checks
23:20:15
karlosz
and notably "This sort of situation shows how precise type checking combined with precise declarations can actually result in reduced type checking.
23:20:18
karlosz
" so that is a good counterpoint to the discussion about "approximate type lattices" beach and heisig were discussing
3:09:10
beach
Bike: OK, that's good news. I remember talking about this control graph where we would initially make very conservative assumptions and then refine them.
3:55:25
beach
Well, I am not going to replace the first phases of the SICL compiler by the libraries that scymtym is working on any time soon. But I think we should aim for it as a long-term goal.
3:55:32
beach
His libraries have lots of external dependencies on other libraries, and those other libraries must be present in the SICL executable from the start in order for it to be possible to run the compiler.
3:55:38
beach
Fairly recently (the past year, maybe), I started making it possible to load external libraries (like Alexandria) into SICL during bootstrapping, but the effort hasn't been systematic, so I have been duct-taping SICL to make that kind of stuff work.
3:55:44
beach
But I can now see that this work needs to be more systematic. So I think we should continue the goal of making a native executable as soon as possible, and then start a longer effort to make it easier to load external libraries during bootstrapping.
3:55:45
beach
Such an effort may very well involve getting ASDF to work early on during bootstrapping.
5:25:01
beach
Getting ASDF to work early would also avoid the kludges that I now have in order to load Alexandria and other external systems.
6:45:14
no-defun-allowed
Looking at the comment for COMPARISON-MIXIN: "Mixin class for comparison instructions, i.e., instructions that take two inputs, has no output, and has two successors."
6:46:11
no-defun-allowed
"instructions" is plural, so should "has" be corrected to "have"? And there is another group of instructions, which is similar but takes one input and does some test. Is TEST-MIXIN a reasonable name?
6:47:41
no-defun-allowed
(For example, CONSP-INSTRUCTION, STANDARD-OBJECT-P-INSTRUCTION. But I am not sure if all the relevant instructions check tags, so I don't think I should mention it in the name.)