Handbook
Glossary
gcse ( insn -- insn' )
Vocabulary
compiler
.
cfg
.
gvn
Inputs
insn
an
object
Outputs
insn'
an
object
Definition
IN:
compiler.cfg.gvn
GENERIC:
gcse
( insn -- insn' )
Methods
USING:
compiler.cfg.gvn
compiler.cfg.instructions
;
M:
##callback-inputs
gcse
defs-available
;
USING:
compiler.cfg.gvn
compiler.cfg.instructions
;
M:
##copy
gcse
defs-available
;
USING:
accessors
assocs
compiler.cfg.gvn
compiler.cfg.gvn.graph
compiler.cfg.instructions
grouping
kernel
sequences
;
M:
##phi
gcse
dup
inputs>>
values
[
vreg>vn
]
map
sift
dup
all-equal?
[
[
first
?eliminate
]
unless-empty
]
[
drop
eliminate-redundancy
]
if
;
USING:
compiler.cfg.gvn
compiler.cfg.instructions
;
M:
alien-call-insn
gcse
defs-available
;
USING:
arrays
compiler.cfg.gvn
sequences
;
M:
array
gcse
[
gcse
]
map
;
USING:
compiler.cfg.def-use
compiler.cfg.gvn
compiler.cfg.instructions
kernel
sequences
;
M:
insn
gcse
dup
defs-vregs
length
1
=
[
eliminate-redundancy
]
when
;