Handbook
Glossary
<residency-network> ( nodes edges -- network )
Vocabulary
compiler
.
cfg
.
register-allocation
.
greedy
.
regions
Inputs
nodes
an
object
edges
an
object
Outputs
network
an
object
Definition
USING:
accessors
kernel
math
sequences
;
IN:
compiler.cfg.register-allocation.greedy.regions
::
<residency-network>
( nodes edges -- network )
H{
}
clone
H{
}
clone
nodes
length
dup
1
+
residency-network
boa
:>
network nodes
[
first
]
map-sum
edges
[
third
]
map-sum
+
1
+
:>
infinity nodes
[|
node i |
node
first
network
source>>
i network
add-capacity
node
second
[
infinity i network
sink>>
network
add-capacity
]
when
]
each-index
edges
[|
edge |
edge
first
edge
second
=
[
]
[
edge
third
edge
first
edge
second
network
add-capacity
edge
third
edge
second
edge
first
network
add-capacity
]
if
]
each
network
;