Handbook
Glossary
hint-scores ( interval -- scores )
Vocabulary
compiler
.
cfg
.
register-allocation
.
greedy
Inputs
interval
an
object
Outputs
scores
an
object
Definition
USING:
accessors
assocs
compiler.cfg.linear-scan.ranges
kernel
math
namespaces
sequences
;
IN:
compiler.cfg.register-allocation.greedy
::
hint-scores
( interval -- scores )
H{
}
clone
:>
scores interval
interval-progress
hint>>
[
1
swap
scores
set-at
]
when*
interval
vreg>>
greedy-copy-hints
get
at
[|
hint |
hint
second
interval
ranges>>
ranges-cover?
[
hint
first
greedy-vreg-unions
get
at
[|
peer |
hint
second
peer
ranges>>
ranges-cover?
[
hint
third
peer
reg>>
scores
at
0
or
+
peer
reg>>
scores
set-at
]
when
]
each
]
when
]
each
scores
;