Handbook
Glossary
value-number ( insn -- )
Vocabulary
compiler
.
cfg
.
gvn
Inputs
insn
an
object
Outputs
None
Definition
IN:
compiler.cfg.gvn
GENERIC:
value-number
( insn -- )
Methods
USING:
compiler.cfg.gvn
compiler.cfg.instructions
;
M:
##callback-inputs
value-number
record-defs
;
USING:
accessors
compiler.cfg.gvn
compiler.cfg.gvn.graph
compiler.cfg.instructions
kernel
;
M:
##copy
value-number
[
src>>
vreg>vn
]
[
dst>>
]
bi
set-vn
;
USING:
accessors
assocs
compiler.cfg.gvn
compiler.cfg.gvn.graph
compiler.cfg.instructions
grouping
kernel
sequences
;
M:
##phi
value-number
dup
inputs>>
values
[
vreg>vn
]
map
sift
dup
all-equal?
[
[
drop
]
[
first
redundant-instruction
]
if-empty
]
[
drop
check-redundancy
]
if
;
USING:
compiler.cfg.gvn
compiler.cfg.instructions
;
M:
alien-call-insn
value-number
record-defs
;
USING:
arrays
compiler.cfg.gvn
sequences
;
M:
array
value-number
[
value-number
]
each
;
USING:
compiler.cfg.def-use
compiler.cfg.gvn
compiler.cfg.instructions
kernel
sequences
;
M:
insn
value-number
dup
defs-vregs
length
1
=
[
check-redundancy
]
[
drop
]
if
;