Handbook
Glossary
conflict-split-site ( bundle conflict -- site/f )
Vocabulary
compiler
.
cfg
.
register-allocation
.
backtracking
Inputs
bundle
an
object
conflict
an
object
Outputs
site/f
an
object
Definition
USING:
kernel
math
namespaces
sequences
;
IN:
compiler.cfg.register-allocation.backtracking
::
conflict-split-site
( bundle conflict -- site/f )
bundle
bundle-split-sites
:>
sites sites
empty?
[
f
]
[
sites
[
conflict
<
]
filter
:>
prefix-sites prefix-sites
empty?
[
sites
first
]
[
prefix-sites
last
:>
best! bundle best
bundle-site-weights
+
:>
cost! prefix-sites
[|
site
|
bundle site
bundle-site-weights
:>
( before after ) before after
+
:>
candidate before after
=
not
candidate cost
<
and
[
site best! candidate cost!
]
when
]
each
best prefix-sites
last
=
[
]
[
backtracking-cluster-splits
inc
]
if
best
]
if
]
if
;