freenode/#clasp - IRC Chatlog
Search
2:59:35
Bike
karlosz: it generates more assignments and temporaries than it needs to, for sure. it's because of how ast-to-hir works. i couldn't think of a way to write it that avoided that while being understandable.
3:03:05
karlosz
i think it wouldn't be so bad doing it in a separate coalescing pass if you have an interference graph
3:12:59
karlosz
hm, it seems like this inlining approach can't work for functions with rest arguments
3:13:43
karlosz
the number of arguments the node is going to take is already precomputed ahead of time
3:19:31
karlosz
you just need to push the correct number of arguments on the stack and call the appropriate bytecode
3:23:01
karlosz
although i guess even if you redefined the function and put inline on it it would still be tricky
3:24:10
karlosz
well if you have a function like + in the flowgraph, it has an arbitrary number of inputs
3:24:59
karlosz
but if you tried to put the ast of (lambda (x y) (system-call 100 x y)) or whatever and inline that
3:25:40
karlosz
but for a function with &rest you can'tcompute that up front in the ast you're returning from fun-info
3:35:04
karlosz
so even though the number of arguments is known at inlining time, its not possible to just make a HIR node with the right number of inputs?
3:35:35
karlosz
that would fit clisp's calling convention better than explicitly making a list in the hir graph
3:36:55
Bike
yes but i don't understand what you want this node to be, or do, or where it would be inserted for inlining, or anything.
3:38:12
karlosz
well when i translate the node to bytecode, it just makes bytecode to push each of the inputs on the stack
3:39:44
karlosz
i don't understand. the funcall instruction can take any number of inputs, without creating a list. ie (+ 1 2 3) creates a hir node with 3 inputs
3:43:14
Bike
if you have a lambda list (x &rest y) the ENTER-INSTRUCTION has three outputs - the closure, X, and Y, right?
3:44:01
Bike
But, since we're inlining, the enter-instruction goes away, and we have to replace it with something.
3:46:59
karlosz
i'd like to have the 4 inputs (or however many is determined at inline time) wired directly to the node
3:55:45
Bike
oh, if you mean you have something with a &rest you want to "inline", you can just use a compiler macro instead
3:56:01
Bike
e.g. have (funcall x ...) expand to (cleavir-primop:funcall (coerce-to-function x) ...)
4:02:03
Bike
if you don't want to define an clisp-normal compiler macro function, you can have function-info just make one up like you're already doing with ASTs
13:30:11
drmeister
So that they can be integrated seamlessly with everything else but be constantly compacted into their own small pool for good (hopefully) cache behavior.
13:33:49
Bike
drmeister: does cando compare lisp number objects with < etc. in C++? because i'm trying to delete those operators (clasp doesn't use them)
13:46:44
Bike
i deleted operator< etc from General_O, where i'm pretty certain they should not exist, but i can imagine them making sense for numbers