freenode/#sbcl - IRC Chatlog
Search
14:15:05
scymtym
could anyone briefly review https://github.com/scymtym/sbcl/compare/parse-specializer-fix~4...parse-specializer-fix
14:23:45
stassats
i want a specialized check-bound to be selected for (defun bar (x y) (declare (fixnum y)) (svref x (+ y 2))), for unsigned-num
14:24:12
stassats
but it'll be selected only when the cost is lower than the tagged variant, but then it might get selected when the index is actually tagged
14:25:38
scymtym
i don't see how (sb-pcl:parse-specializer-using-class '(eql FORM) GF) can work at all unless FORM can be evaluated in the null lexical environment
14:28:12
scymtym
this is not always called under our control but supposed to be called by implementers of MOP extensions. so they would have to take care to evaluate FORM
14:29:41
scymtym
if somebody took the specializer s-expression from a DEFMETHOD form and called PARSE-SPECIALIZER-USING-CLASS with it, they would be screwed
14:39:00
scymtym
stassats: is the + 2 not reflected in the displacement? or is that already folded into a untagging/interior offset for RCX?
14:43:20
scymtym
that prevents folding the shift into the scale? i was wondering why the displacement is 1
14:46:31
scymtym
i wonder whether pkhuong's idea for ir2 expression trees combined with tree tiling would be practical for this kind of thing
14:46:43
scymtym
it worked pretty well in my toy setup: https://techfak.de/~jmoringe/instruction-selection-rewriting.ogv
14:53:20
stassats
could at least use predetermined SCs to drive instruction selection, without iterating over all possibilities
15:09:44
stassats
maybe when doing emit-moves-and-coercions i can actually change the target VOP if it can handle the coercion
21:11:28
pkhuong
scymtym: i think peephole for ir2-level pipelines will fix most of these codegen issues
21:12:22
pkhuong
not ideal to generate crummy code and fix it in post, but superoptimisation tools should be able to generate patterns for us
21:17:05
pfdietz
It would be interesting if code generated from lisp has some different superoptimization opportunities.
21:17:56
pfdietz
"we discovered that Souper’s intermediate representation was sufficiently similar to the one in Microsoft Visual C++ that we applied Souper to that compiler as well. "
21:21:58
pkhuong
we can't even get jump tensioning right... actually modeling BB locations feels like a heavy lift ;)
21:22:17
pfdietz
I'd want to track coldness back through control flow, so anything that necessarily executes cold code is itself cold.