compiler.cfg.linear-scan: fix bad interaction between inactive intervals and sync points
parent
0f4c5d2bff
commit
94f6ac98de
|
@ -62,8 +62,8 @@ M: live-interval handle
|
|||
|
||||
M: sync-point handle ( sync-point -- )
|
||||
[ n>> deactivate-intervals ]
|
||||
[ handle-sync-point ]
|
||||
[ n>> activate-intervals ]
|
||||
[ handle-sync-point ]
|
||||
tri ;
|
||||
|
||||
: smallest-heap ( heap1 heap2 -- heap )
|
||||
|
|
|
@ -39,6 +39,11 @@ SYMBOL: pending-interval-assoc
|
|||
drop leader vreg rep-of lookup-spill-slot
|
||||
] unless ;
|
||||
|
||||
ERROR: not-spilled-error vreg ;
|
||||
|
||||
: vreg>spill-slot ( vreg -- spill-slot )
|
||||
dup vreg>reg dup spill-slot? [ nip ] [ drop leader not-spilled-error ] if ;
|
||||
|
||||
: vregs>regs ( vregs -- assoc )
|
||||
[ f ] [ [ dup vreg>reg ] H{ } map>assoc ] if-empty ;
|
||||
|
||||
|
@ -144,7 +149,7 @@ M: vreg-insn assign-registers-in-insn
|
|||
|
||||
M: gc-map-insn assign-registers-in-insn
|
||||
[ [ assign-insn-defs ] [ assign-insn-uses ] [ assign-insn-temps ] tri ]
|
||||
[ gc-map>> [ [ vreg>reg ] map ] change-gc-roots drop ]
|
||||
[ gc-map>> [ [ vreg>spill-slot ] map ] change-gc-roots drop ]
|
||||
bi ;
|
||||
|
||||
M: insn assign-registers-in-insn drop ;
|
||||
|
|
Loading…
Reference in New Issue