Search
Monday, 14th of May 2018, 7:30:45 UTC
13:26:58
Bike
drmeister: how are the logical pathname translations set up? my build of bclasp cst doesn't seem to understand sys:
14:35:00
Bike
drmeister: i have my cst changes built and i'm looking at them fail now, if you have time to come and look like we talked about
16:39:42
Bike
got things to the point where compiling something just segfaults
16:44:11
drmeister
That's what I'm calling it.
16:44:32
Bike
i am at... the... computer at my desk
16:44:59
Bike
just gonna run it under lldb
16:45:18
Kevslinger
BigMac next to the CoK
17:03:00
drmeister
Bike: using compile will invoke llvm and run part of the function - so if there is bad llvm-ir then it may crash.
17:04:21
drmeister
Using clasp-cleavir:cleavir-compile-file is the least crashy way to test things. Cleavir will do its thing and generate llvm-ir and write it out to a file.
17:05:15
drmeister
As long as there are no compile-time side effects
17:05:35
drmeister
Then we can check the llvm-ir at our leasure.
17:06:13
drmeister
Im going to blame that on my phone
17:06:54
Bike
i got "NIL is not of type LLVM-SYS:BASIC-BLOCK" again! this time it's probably in code i wrote tho, so i can trace it
17:33:37
Bike
well the problem is because the *tags* aren't being set up properly from the basic blocks, but i don't know why that is
17:38:16
Bike
ok, i reduced the example even farther, i guess since there's something wrong with having blocks
17:38:21
Bike
and it compiles, so there's bitcode
17:40:02
Bike
i don't have a program called 'opt' though, in llvm. there's an llvm-opt-report?
17:49:50
Bike
drmeister: how do i run it? like what options?
17:51:20
drmeister
I usually just run -O3 on it
18:01:02
Bike
like opt -O3 /tmp/test.bc >/tmp/otest.bc?
18:01:05
Bike
i ran that and it didn't complain
18:19:17
Bike
well, i fixed the basic block nil thing in the meantime
18:46:53
drmeister
If there were a problem with the ir opt would complain
18:47:28
drmeister
Can you past the code and ir and I’ll check it by hand.
18:48:47
Bike
the code is just (lambda ())
18:51:35
Bike
drmeister: http://ix.io/1ajU ir
18:59:36
Bike
loading a cleavir compilefile'd fasl seems to work fine
18:59:46
Bike
so i guess i messed something up with compile?
19:05:20
drmeister
You have fixed a bunch of bugs - does compile work now?
19:05:38
drmeister
We can have compile dump ir
19:05:51
drmeister
Then we can look at it the same way.
19:06:16
drmeister
Are you allocating exceptions with the catch-instruction?
19:07:36
Bike
and no, it doesn't allocate exceptions. it just does the same misnamed cc_pushLandingPad or whatever it is
19:07:45
Bike
i haven't tried actually unwinding yet
19:08:35
Bike
it doesn't compile, but it just errors instead of segfaulting, so that's nice
19:12:53
Bike
hm, it's a cleavir internal problem too
19:13:15
Bike
we haven't had an instruction with multiple successors and an output that's closed over before
19:18:12
Bike
i guess we kind of need to special case it anyway due to its odd control flow
19:22:03
karlosz
does it make more sense to use HIR or MIR as a backend for generating bytecode for a stack machine?
19:22:44
Bike
mir is supposed to be what's used for that regardless of the target
19:22:51
karlosz
i could hack up the hir interpreter to produce clisp bytecode instead, but it seems like mir would be more suited for address calculations etc
19:23:27
Bike
what's actually _in_ mir is pretty vague right now, so if you find the existing operators aren't suitable feel free to throw more in
19:23:46
Bike
er, instructions, not operators
19:23:49
Kevslinger
drmeister: Steven said he was not selected for jury duty, so we should be at full strength tomorrow
19:24:08
karlosz
right, i see it isnt documented much in the cleavir doc pdf
19:24:31
karlosz
so is there already a canonical way to get mir from hir, or is it more adhoc than that?
19:24:54
karlosz
does clasp generate llvm straight from mir?
19:26:23
Bike
getting hir is done with cleavir-ir:hir-to-mir
19:26:37
Bike
which pretty much just calls cleavir-ir:specialize on each instruction, and you can define methods on that
19:27:07
Bike
so e.g. clasp has a method on specialize that turns car-instruction into a memref2-instruction
19:30:41
karlosz
it seems like the mir stuff in clasp is more fleshed out
Monday, 14th of May 2018, 19:30:45 UTC