Handbook
Glossary
residual-search ( network -- predecessors )
Vocabulary
compiler
.
cfg
.
register-allocation
.
greedy
.
regions
Inputs
network
an
object
Outputs
predecessors
an
object
Definition
USING:
accessors
arrays
assocs
kernel
math
sequences
vectors
;
IN:
compiler.cfg.register-allocation.greedy.regions
::
residual-search
( network -- predecessors )
H{
}
clone
:>
seen network
source>>
dup
seen
set-at
network
source>>
1vector
:>
queue 0
:>
cursor!
[
cursor queue
length
<
]
[
cursor queue
nth
:>
from from network
neighbors>>
at
[|
to |
to seen
key?
[
]
[
from to
2array
network
capacities>>
at
0
or
0
>
[
from to seen
set-at
to queue
push
]
when
]
if
]
each
cursor 1
+
cursor!
]
while
seen
;