compiler.cfg.linear-scan.assignment: correct representation used when spilling
Previously the rep-of word was used. But as the vregs representation can change, you need to instead use the representation it uas as the spill point.char-rename
parent
69acbbbefd
commit
b89a305ef7
|
@ -179,7 +179,7 @@ IN: compiler.cfg.linear-scan.assignment.tests
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
{
|
{
|
||||||
V{ { RDI float-rep T{ spill-slot } } }
|
V{ { RDI int-rep T{ spill-slot } } }
|
||||||
} [
|
} [
|
||||||
f f <basic-block> <cfg> cfg set
|
f f <basic-block> <cfg> cfg set
|
||||||
H{ } clone spill-slots set
|
H{ } clone spill-slots set
|
||||||
|
|
|
@ -112,14 +112,19 @@ RENAMING: assign [ vreg>reg ] [ vreg>reg ] [ vreg>reg ]
|
||||||
[ pending-interval-heap get heap-members ] 2dip
|
[ pending-interval-heap get heap-members ] 2dip
|
||||||
'[ _ _ spill-required? ] filter ;
|
'[ _ _ spill-required? ] filter ;
|
||||||
|
|
||||||
: spill/reload ( interval -- {reg,rep,slot} )
|
: rep-at-insn ( n interval -- rep )
|
||||||
[ reg>> ] [ vreg>> dup rep-of dup swapd assign-spill-slot ] bi 3array ;
|
(find-use) [ def-rep>> ] [ use-rep>> ] bi or ;
|
||||||
|
|
||||||
: spill/reloads ( intervals -- spill/reloads )
|
: spill/reload ( n interval -- {reg,rep,slot} )
|
||||||
[ spill/reload ] map ;
|
[ rep-at-insn ] keep [ reg>> ] [ vreg>> ] bi
|
||||||
|
pick assign-spill-slot swapd 3array ;
|
||||||
|
|
||||||
|
: spill/reloads ( n intervals -- spill/reloads )
|
||||||
|
[ spill/reload ] with map ;
|
||||||
|
|
||||||
: spill/reloads-for-call-gc ( ##call-gc -- spill-seq )
|
: spill/reloads-for-call-gc ( ##call-gc -- spill-seq )
|
||||||
[ gc-map>> gc-roots>> ] [ insn#>> ] bi spill-intervals spill/reloads ;
|
[ gc-map>> gc-roots>> ] [ insn#>> ] bi
|
||||||
|
[ spill-intervals ] keep swap spill/reloads ;
|
||||||
|
|
||||||
: emit-##call-gc ( insn -- )
|
: emit-##call-gc ( insn -- )
|
||||||
dup spill/reloads-for-call-gc
|
dup spill/reloads-for-call-gc
|
||||||
|
|
Loading…
Reference in New Issue