Handbook
Glossary
remove-dead-code* ( node -- node' )
Vocabulary
compiler
.
tree
.
dead-code
.
liveness
Inputs
node
an
object
Outputs
node'
an
object
Definition
IN:
compiler.tree.dead-code.liveness
GENERIC:
remove-dead-code*
( node -- node' )
Methods
USING:
accessors
compiler.tree
compiler.tree.dead-code.liveness
;
M:
#alien-callback
remove-dead-code*
[
(remove-dead-code)
]
change-child
;
USING:
compiler.tree
compiler.tree.dead-code.liveness
compiler.tree.dead-code.simple
;
M:
#alien-node
remove-dead-code*
maybe-drop-dead-outputs
;
USING:
accessors
compiler.tree
compiler.tree.dead-code.branches
compiler.tree.dead-code.liveness
kernel
namespaces
sequences
;
M:
#branch
remove-dead-code*
[
[
[
(remove-dead-code)
]
map
]
change-children
]
[
if-node
set
]
bi
;
USING:
arrays
compiler.tree
compiler.tree.dead-code.liveness
compiler.tree.dead-code.recursive
kernel
;
M:
#call-recursive
remove-dead-code*
[
drop-call-recursive-inputs
]
[
]
[
drop-call-recursive-outputs
]
tri
3array
;
USING:
accessors
combinators
compiler.tree
compiler.tree.dead-code.liveness
compiler.tree.dead-code.simple
kernel
words
;
M:
#call
remove-dead-code*
{
{
[
dup
dead-flushable-call?
]
[
remove-flushable-call
]
}
{
[
dup
word>>
"simplifications"
word-prop
]
[
simplify-call
]
}
[
maybe-drop-dead-outputs
]
}
cond
;
USING:
accessors
assocs
compiler.tree
compiler.tree.dead-code.liveness
kernel
;
M:
#copy
remove-dead-code*
[
in-d>>
]
[
out-d>>
]
bi
2dup
swap
zip
<#data-shuffle>
remove-dead-code*
;
USING:
accessors
compiler.tree
compiler.tree.dead-code.liveness
compiler.tree.dead-code.simple
;
M:
#enter-recursive
remove-dead-code*
[
filter-live
]
change-out-d
;
USING:
compiler.tree
compiler.tree.dead-code.liveness
compiler.tree.dead-code.simple
;
M:
#introduce
remove-dead-code*
maybe-drop-dead-outputs
;
USING:
combinators
compiler.tree
compiler.tree.dead-code.branches
compiler.tree.dead-code.liveness
;
M:
#phi
remove-dead-code*
{
[
hoist-drops
]
[
remove-phi-inputs
]
[
remove-phi-outputs
]
[
]
}
cleave
;
USING:
accessors
compiler.tree
compiler.tree.dead-code.liveness
kernel
sequences
;
M:
#push
remove-dead-code*
[
out-d>>
first
live-value?
]
1guard
;
USING:
accessors
arrays
compiler.tree
compiler.tree.dead-code.liveness
compiler.tree.dead-code.recursive
compiler.tree.dead-code.simple
kernel
;
M:
#recursive
remove-dead-code*
[
drop-recursive-inputs
]
[
[
(remove-dead-code)
]
change-child
dup
label>>
[
filter-live
]
change-enter-out
drop
]
[
drop-recursive-outputs
]
tri
3array
;
USING:
compiler.tree
compiler.tree.dead-code.liveness
;
M:
#return-recursive
remove-dead-code*
;
USING:
accessors
combinators.short-circuit
compiler.tree
compiler.tree.dead-code.liveness
compiler.tree.dead-code.simple
kernel
sequences
;
M:
#shuffle
remove-dead-code*
[
filter-live
]
change-in-d
[
filter-live
]
change-out-d
[
filter-live
]
change-in-r
[
filter-live
]
change-out-r
[
filter-mapping
]
change-mapping
dup
{
[
in-d>>
empty?
]
[
in-r>>
empty?
]
}
1&&
[
drop
f
]
when
;
USING:
accessors
compiler.tree
compiler.tree.dead-code.liveness
compiler.tree.dead-code.simple
;
M:
#terminate
remove-dead-code*
[
filter-live
]
change-in-d
[
filter-live
]
change-in-r
;
USING:
compiler.tree
compiler.tree.dead-code.liveness
;
M:
node
remove-dead-code*
;