Handbook
Glossary
derived-definitions ( cfg -- derived )
Vocabulary
compiler
.
cfg
.
register-allocation
.
ssa
.
bases
Inputs
cfg
an
object
Outputs
derived
an
object
Definition
USING:
assocs
compiler.cfg.def-use
compiler.cfg.linearization
kernel
math
sequences
;
IN:
compiler.cfg.register-allocation.ssa.bases
::
derived-definitions
( cfg -- derived )
cfg
cfg>insns
:>
instructions
H{
}
clone
:>
previous! instructions
length
1
+
:>
remaining!
t
:>
changed!
[
changed
]
[
remaining
zero?
[
inconsistent-ssa-derived-pointers
]
when
remaining 1
-
remaining!
H{
}
clone
:>
current instructions
[|
insn |
previous insn
derived-definition?
[
insn
defs-vregs
[
t
swap
current
set-at
]
each
]
when
]
each
current previous
=
not
changed! current previous!
]
while
previous
;