Search
2:42:41
Bike
you could just disable the inline definitions for a bit
2:42:41
karlosz
not sure how we can do the flow of the callee with the constant foldable ness though
2:43:00
karlosz
right now im just using the two-arg-foo functions
2:43:16
karlosz
(lambda () (- 1 2) t) flushes (- 1 2) now
2:45:11
karlosz
*sigh* also need to flush multiple-to-fixed and co
2:45:56
Bike
reocgnizing mv-bind lambdas would be tricky, i don't think we have information about the defaults available in bir, and we need it
2:46:03
Bike
(cos a non nil default would work differently)
2:48:48
karlosz
its compiled in the ast
2:55:57
karlosz
OK, so in order to have (lambda () (- 1 (+ 1 2)) t) flush the arithemtic expression i needed:
2:56:06
karlosz
1. mark two-arg- and two-arg-+ as :FLUSHABLE
2:56:18
karlosz
2. teach it to flush multiple-to-fixed
2:56:41
karlosz
3. teach it to flush vprimops with primop infos with FDEFINITION as names
2:56:55
karlosz
so hopefully when we extend the attributes thing to vprimops it won't be so bad
2:58:01
karlosz
i'll just hard code it for now since the set of primops is hardcoded in BIR/primops
2:58:50
Bike
but yeah i can probably fix that up tomorrow
2:59:18
karlosz
i'm going to see how many of these arithmetic calls actually get flushed during self build now
2:59:52
karlosz
these are things llvm can't flush for us. i think llvm could do readvars and constants
3:01:28
karlosz
you'd expect that there shouldn't be any in a normal program, but...
3:03:04
karlosz
hm, marking the primop flushable doesn't help since its tangled in the TYPEQ code
3:03:07
Bike
oh. well, we don't merge constants or nothin
3:06:17
karlosz
this is all the ocde generated for (lambda (x) (car x) t)
3:06:21
karlosz
https://paste.gnome.org/prgg8cpuy
3:06:58
karlosz
it'd be nice if i could flush the car call before it gets inlined
3:07:14
Bike
ok, well going back to inlining for a second i've been thinking we could make inlining just another kind of transformation
3:07:15
karlosz
since there's all this phi stuff to look through
3:07:23
Bike
and then we could just prioritize flushing transformations
3:07:52
karlosz
or i don't know what you mean as "just another kind of transformation"
3:08:10
Bike
i mean like the general mechanism that rewrites calls
3:09:33
karlosz
also there are three primop calls to SYMBOL VALUE that get flushed during self build, for whatever reason
3:10:07
Bike
from (lambda (x) (car x) t)...?
3:10:16
Bike
weird. i don't know what that would be
3:11:41
karlosz
nothing to do with (lambda (x) (car x) t)... i was just running the code flusher over self build
4:06:27
beach
Good morning everyone!