compiler: Rename value-info, live-interval
parent
97f6d171ed
commit
5f377c0849
basis/compiler
cfg/linear-scan
allocation
live-intervals
tree/propagation/info
|
@ -50,7 +50,7 @@ IN: compiler.cfg.linear-scan.allocation
|
|||
|
||||
GENERIC: handle ( obj -- )
|
||||
|
||||
M: live-interval handle
|
||||
M: live-interval-state handle
|
||||
[ start>> deactivate-intervals ]
|
||||
[ start>> activate-intervals ]
|
||||
[ assign-register ]
|
||||
|
|
|
@ -20,7 +20,7 @@ TUPLE: vreg-use n def-rep use-rep spill-slot? ;
|
|||
|
||||
: <vreg-use> ( n -- vreg-use ) vreg-use new swap >>n ;
|
||||
|
||||
TUPLE: live-interval
|
||||
TUPLE: live-interval-state
|
||||
vreg
|
||||
reg spill-to spill-rep reload-from reload-rep
|
||||
start end ranges uses
|
||||
|
@ -47,7 +47,7 @@ M: f covers? 2drop f ;
|
|||
|
||||
M: live-range covers? [ from>> ] [ to>> ] bi between? ;
|
||||
|
||||
M: live-interval covers? ( insn# live-interval -- ? )
|
||||
M: live-interval-state covers? ( insn# live-interval -- ? )
|
||||
ranges>>
|
||||
dup length 4 <= [
|
||||
[ covers? ] with any?
|
||||
|
@ -84,7 +84,7 @@ M: live-interval covers? ( insn# live-interval -- ? )
|
|||
[ extend-range ] [ add-new-range ] if ;
|
||||
|
||||
: <live-interval> ( vreg reg-class -- live-interval )
|
||||
\ live-interval new
|
||||
\ live-interval-state new
|
||||
V{ } clone >>uses
|
||||
V{ } clone >>ranges
|
||||
swap >>reg-class
|
||||
|
|
|
@ -26,16 +26,16 @@ M: complex eql? over complex? [ = ] [ 2drop f ] if ;
|
|||
! you receive, always construct new ones. We don't declare the
|
||||
! slots read-only to allow cloning followed by writing, and to
|
||||
! simplify constructors.
|
||||
TUPLE: value-info
|
||||
TUPLE: value-info-state
|
||||
class
|
||||
interval
|
||||
literal
|
||||
literal?
|
||||
slots ;
|
||||
|
||||
CONSTANT: null-info T{ value-info f null empty-interval }
|
||||
CONSTANT: null-info T{ value-info-state f null empty-interval }
|
||||
|
||||
CONSTANT: object-info T{ value-info f object full-interval }
|
||||
CONSTANT: object-info T{ value-info-state f object full-interval }
|
||||
|
||||
: interval>literal ( class interval -- literal literal? )
|
||||
#! If interval has zero length and the class is sufficiently
|
||||
|
@ -52,7 +52,7 @@ CONSTANT: object-info T{ value-info f object full-interval }
|
|||
} cond
|
||||
] if ;
|
||||
|
||||
: <value-info> ( -- info ) \ value-info new ; inline
|
||||
: <value-info> ( -- info ) \ value-info-state new ; inline
|
||||
|
||||
DEFER: <literal-info>
|
||||
|
||||
|
|
Loading…
Reference in New Issue