freenode/#sbcl - IRC Chatlog
Search
17:33:39
stylewarning
What do you all think about something that allows a function to be inlined if the types of its arguments at the call-site have been determined?
18:36:18
pfdietz
I have wondered about how one could get at least some type information to a compiler macro. Some sort of semi-portable type propagator would be interesting. It would involve sticking declaration information in the environment objects, and some limited approximation to data flow.
18:37:09
stassats
so, a way to get compiler macros with type information is to not use compiler macros
18:48:55
|3b|
i think opticl has some macros that look at declarations from env, no propagation though
18:51:57
pfdietz
For that to work it would be nice to have some kind of if-then function type declarations. If the types of F are ..., THEN the result types are ..... The existing FTYPE declarations are not like that.
18:53:39
pfdietz
But after compiler macros are expanded. So the user would have to be able to write deftransforms or something like that.
19:23:10
stylewarning
I’m suggesting a mechanism to inline when there’s something to be gained under relatively benign conditions
21:32:46
stylewarning
(it appears inlines are recorded in proclaim.lisp and actual expansions happen in ir1opt.lisp)
21:34:57
stylewarning
stassats: I had a few goals in mind. (1) determine at call-sites whether arguments of a combination had "specific" type information derived/associated, (2) check if that information is known at inline-time
21:37:46
stylewarning
i was looking to, to start, hook into how MAYBE-INLINE is treated as opposed to trying to thread through my own new category of "inline"