freenode/#clasp - IRC Chatlog
Search
17:10:59
drmeister
I think the input to precalc-value-instruction is outside of the scope of what Cleavir does. Think of a precalc-value-instruction and it's input as one thing - it's a literal value that either comes from the literal vector or it's an immediate.
17:11:49
drmeister
So translate-datum doesn't have anything to do with precalc-value-instruction and the input to precalc-value-instruction.
17:15:25
Bike
the input is the one passed into translate-simple-instruction, which is the result of translate-datum
17:16:12
Bike
so the input in the translate-simple-instruction method should result in it hitting the path with the warning
17:17:39
Bike
https://github.com/clasp-developers/clasp/blob/dev/src/lisp/kernel/cleavir/translate-instruction.lisp#L74-L79
17:20:11
drmeister
That translate-simple-instruction method USED to get a i64, which was a simple index into the literal vector - but with immediates I needed to get a little fancier - I didn't want to put immediates into the literal vector - that would be silly.
17:22:31
drmeister
And I don't see how the clasp-cleavir:immediate-literal (an immediate) and clasp-cleavir:arrayed-literal (an index) pass through translate-datum to be inputs to the translate-simple-instruction.
17:23:13
Bike
https://github.com/clasp-developers/clasp/blob/dev/src/lisp/kernel/cleavir/translate.lisp#L155-L169
17:23:25
drmeister
Can you do some tracing and printing of inputs to see how immediate-literal and arrayed-literal find their way in there?
17:27:30
Bike
so first i'll fix up this thing so that it doesn't force data to be in memory, and then i can look at that
17:31:12
Bike
probably: eliminate the immediate-literal class entirely; move any information in the arrayed-literal class into the precalc-value-instruction itself; rewrite hoisting to only generate a precalc-value-instruction for non-immediate constants
17:33:08
drmeister
Ok - that sounds right. I've had a nagging feeling that the input for precalc-value-instruction should be pulled into the instruction itself. Then it will just output a value with no inputs.
17:34:54
Bike
immediate inputs are mostly nice if we could use a lexical-location or whatnot in the same place
17:35:23
Bike
beach made a similar change a few days ago where the offset argument of memref/set2 was moved from an immediate input into the instruction
17:36:20
Bike
either way i'd like to keep the intent of immediates in cleavir, which is that they only have small integers in them
19:00:15
Bike
my translate-instruction changes results in obviously wrong results but i'm not sure why
19:00:27
Bike
looks like return-instruction or F->M or something should usually generate an insertvalue, but it's not
19:00:45
Bike
but nothing in translate-instruction actually seems to generate insertvalue, i figure that's cmp level...
19:06:49
Bike
it... looks kind of like it's storing things into e.g. G110027, then reading them out of G1100277... what the heck...