compiler.cfg.linear-scan: clean up spill slot assignment
parent
65f86bfce7
commit
ffd1844d52
|
@ -118,7 +118,7 @@ SYMBOL: unhandled-intervals
|
|||
[ reg-classes ] dip { } map>assoc ; inline
|
||||
|
||||
: next-spill-slot ( rep -- n )
|
||||
rep-size cfg get
|
||||
cfg get
|
||||
[ swap [ align dup ] [ + ] bi ] change-spill-area-size drop
|
||||
<spill-slot> ;
|
||||
|
||||
|
@ -129,12 +129,10 @@ SYMBOL: unhandled-sync-points
|
|||
SYMBOL: spill-slots
|
||||
|
||||
: assign-spill-slot ( coalesced-vreg rep -- spill-slot )
|
||||
dup tagged-rep? [ drop int-rep ] when
|
||||
spill-slots get [ nip next-spill-slot ] 2cache ;
|
||||
rep-size spill-slots get [ nip next-spill-slot ] 2cache ;
|
||||
|
||||
: lookup-spill-slot ( coalesced-vreg rep -- spill-slot )
|
||||
dup tagged-rep? [ drop int-rep ] when
|
||||
2array spill-slots get ?at [ ] [ bad-vreg ] if ;
|
||||
rep-size 2array spill-slots get ?at [ ] [ bad-vreg ] if ;
|
||||
|
||||
: init-allocator ( registers -- )
|
||||
registers set
|
||||
|
|
|
@ -36,7 +36,7 @@ M: location hashcode*
|
|||
SYMBOL: spill-temps
|
||||
|
||||
: spill-temp ( rep -- n )
|
||||
spill-temps get [ next-spill-slot ] cache ;
|
||||
rep-size spill-temps get [ next-spill-slot ] cache ;
|
||||
|
||||
: add-mapping ( from to rep -- )
|
||||
'[ _ <location> ] bi@ 2array , ;
|
||||
|
|
Loading…
Reference in New Issue