Handbook
Glossary
<allocation-bundle> ( intervals -- bundle )
Vocabulary
compiler
.
cfg
.
register-allocation
.
backtracking
Inputs
intervals
an
object
Outputs
bundle
an
object
Definition
USING:
accessors
assocs
compiler.cfg.linear-scan.live-intervals
compiler.cfg.register-allocation.spill-sites
kernel
math
namespaces
sequences
sorting
;
IN:
compiler.cfg.register-allocation.backtracking
::
<allocation-bundle>
( intervals -- bundle )
intervals
[
interval-size
]
map-sum
:>
size intervals intervals
length
1
=
intervals
[
minimal-interval?
]
all?
and
[
1/0.
]
[
intervals
[
uses>>
[
spill-site-weight
]
map-sum
]
map-sum
size
/
]
if
size intervals
length
1
=
[
intervals
first
ranges>>
]
[
intervals
[
ranges>>
]
map
concat
[
first
]
sort-by
]
if
intervals
first
interval-reg-class
intervals
first
vreg>>
bundle-spillsets
get
at
allocation-bundle
boa
dup
check-backtracking-bundle
;