Handbook
Glossary
add-weighted-affinity ( a b weight graph affinities -- )
Vocabulary
compiler
.
cfg
.
register-allocation
.
chordal
Inputs
a
an
object
b
an
object
weight
an
object
graph
an
object
affinities
an
object
Outputs
None
Definition
USING:
assocs
compiler.cfg.registers
cpu.architecture
kernel
math
;
IN:
compiler.cfg.register-allocation.chordal
::
add-weighted-affinity
( a b weight graph affinities -- )
a b
=
a graph
key?
not
or
b graph
key?
not
or
[
]
[
a
rep-of
reg-class-of
b
rep-of
reg-class-of
=
[
a affinities
at
b
swap
[
0
or
weight
+
]
change-at
b affinities
at
a
swap
[
0
or
weight
+
]
change-at
]
when
]
if
;