Search
11:24:39
stassats
now that i can insert new lambdas, might come in handy for transforming SETs into lambdas
13:00:55
stassats
can i block compile just two functions in a file?
13:05:38
stassats
ok, how is block compilation different from inlining?
13:06:49
stassats
it shares distinct functions into code components, ok
13:26:17
stassats
can't block compile bit-bash.lisp
13:27:11
stassats
"Expected a definition for SB-KERNEL:%SET-VECTOR-RAW-BITS in cold load"
13:34:47
stassats
something's fishy with block compilation
13:36:29
stassats
it doesn't respect inlining
13:37:03
stassats
(declaim (inline inl)) (defun inl (x) x) (defun a (x) (declare ((unsigned-byte 64) x)) (logcount (inl x)))
13:37:08
stassats
is worse when block compiled
15:27:47
borodust
mhm, libclang seems to cause a memory corruption in SBCL always around address 0x3e80000xxxx
15:28:19
borodust
just `clang_createIndex` is enough to cause this
15:30:04
borodust
does this address block contain smth special that clang is attracted to?
15:30:33
borodust
ccl seems to work fine, which doesn't mean it ain't getting corrupted ofc
15:35:55
borodust
minimal repro case: https://gist.github.com/borodust/c7ffa83e89f007f3d4f998b1decb8b00 (100% on my machine)
18:06:45
karlosz
stassats: yeah, inlining interacts badly with block compilation right now. CMUCL did it right but the inlining code hjas changed a lot
18:07:24
karlosz
when you block compile, you generally don't need to inline though because local calls are fast and dont cause code bloat
18:07:53
karlosz
if you make some of the functions "static" i.e. make them not entry points, they can get let converted and other good stuff
18:08:44
karlosz
imagine everything is stuffed into labels
18:09:19
karlosz
we have some "once use" defuns that are marked inline in the compiler
18:09:49
karlosz
causes 2x code size for no reason, whereas let converting the once use defun is a win
18:10:13
karlosz
also, allows a FACTORIAL function to not call itself through an FDEFN
18:12:45
karlosz
heres the (real-world) use case people ask it for: https://sourceforge.net/p/sbcl/mailman/message/3493226/