Handbook
Glossary
hint-score ( interval reg -- score )
Vocabulary
compiler
.
cfg
.
register-allocation
.
greedy
Inputs
interval
an
object
reg
an
object
Outputs
score
an
object
Definition
USING:
accessors
assocs
compiler.cfg.linear-scan.ranges
kernel
math
namespaces
sequences
;
IN:
compiler.cfg.register-allocation.greedy
::
hint-score
( interval reg -- score )
interval
interval-progress
hint>>
:>
split-hint split-hint
split-hint reg
=
and
[
1
]
[
0
]
if
:>
score! interval
vreg>>
greedy-copy-hints
get
at
[|
hint |
hint
second
interval
ranges>>
ranges-cover?
[
hint
first
greedy-vreg-unions
get
at
[|
peer |
peer
reg>>
reg
=
[
hint
second
peer
ranges>>
ranges-cover?
[
score hint
third
+
score!
]
when
]
when
]
each
]
when
]
each
score
;