Handbook
Glossary
loop-hoist-candidates ( cfg loop -- insns )
Vocabulary
compiler
.
cfg
.
loop-optimization
Inputs
cfg
an
object
loop
an
object
Outputs
insns
an
object
Definition
USING:
accessors
compiler.cfg.def-use
compiler.cfg.rpo
kernel
sequences
sets
;
IN:
compiler.cfg.loop-optimization
::
loop-hoist-candidates
( cfg loop -- insns )
HS{
}
clone
:>
selected
V{
}
clone
:>
result cfg
reverse-post-order
[|
bb |
bb loop
blocks>>
in?
[
bb
instructions>>
[|
insn |
insn
loop-speculatable-insn?
[
insn
uses-vregs
[
loop selected
invariant-loop-use?
]
all?
[
insn result
push
insn
defs-vregs
~quotation~
each
]
when
]
when
]
each
]
when
]
each
result
;