: <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
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?
[ 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
! 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
} cond
] if ;
-: <value-info> ( -- info ) \ value-info new ; inline
+: <value-info> ( -- info ) \ value-info-state new ; inline
DEFER: <literal-info>