01:36 jdv79 joined 01:47 harrow joined 02:01 vendethiel- joined 06:25 domidumont joined 06:36 brrt joined
brrt good * #moarvm 06:37
interesting post on the pyston blog today
nwc10 ooh, thianks for checking on that
nwc10 reads
brrt our jit is comparatively boring 06:39
i.e. we really don't do runtime code modification
06:49 domidumont joined
brrt okay, i have something to put forth the court of #moarvm today again 06:52
06:52 domidumont joined
brrt i sometimes need to spill a value from a register 06:52
(this is another one of those 'i know how to do it the slow way. how to do it the quick and easy way, and is this worth it' stories) 06:53
nwc10 I have no idea about this sort of stuff (sorrY)
hopefully someone who is awake does
brrt hmm
its ultimately just a data structure question though 06:54
my 'value descriptors' sit in array-indexed linked lists so that i can find them by the node (virtual value they represent) or by register they inhabit (while live, anyway) 06:55
it can happen that a value ceases to be live but is not directly evicted from its register because a newer, longer lived value takes it place 06:56
so the list of values in the register slot can have any number of items, and not all of them need to be live
when i do need to spill something, i need to figure out a number of things, notably: which register to spill, whether to insert a store into the code stream, and if so, where to insert it 06:58
spilling, for what it is worth, has the minimum side effect of limiting the live range of values to the point where they are being spilled 06:59
if the value i'm spilling is the only or most long-lived value in the set, then i'll need to insert a store 07:01
if there is a longer lived value in the set of values that describe this node, i don't
so that is a lookup question: how can i efficiently find the longest lived value in the node 07:02
(sorting! .. linked list!)
finding which register to spill is also a difficulty; if there are registers which are already backed by a spilled value, in theory they should have preference over spilling a brand new value 07:04
where to insert it is usually pretty simple, fortunately; that is just after the creation of the first live value 07:05
(the store)
doing this all with linked lists is easy enough, it is just busywork, that i'd rather replace with constant time ops 07:06
maintaining a single longest-lived-register is easy 07:07
maintaining a live-range heap is not necessarily so easy
although it is doable
but i'm not entirely sure what to do with it if you have it 07:09
ok, i'm clearly just rambling :-) 07:13
07:49 zakharyas joined 08:49 vendethiel joined 10:15 vendethiel joined 12:24 colomon joined 12:36 dalek joined 12:47 cognominal left 13:26 vendethiel- joined 17:46 domidumont joined 20:06 ilbot3 joined 21:48 harrow` joined 21:51 BinGOs_ joined, lnx_ joined 22:02 BinGOs joined