Handbook
Glossary
move-loop-instructions ( cfg loop chosen preheader -- )
Vocabulary
compiler
.
cfg
.
loop-optimization
Inputs
cfg
an
object
loop
an
object
chosen
an
object
preheader
an
object
Outputs
None
Definition
USING:
accessors
assocs
compiler.cfg
kernel
math
namespaces
sequences
sets
;
IN:
compiler.cfg.loop-optimization
::
move-loop-instructions
( cfg loop chosen preheader -- )
IH{
}
clone
:>
moved chosen
[
t
swap
moved
set-at
]
each
loop
blocks>>
members
[|
bb |
bb
instructions>>
[
moved
key?
not
]
filter
bb
instructions<<
]
each
preheader
instructions>>
:>
destination destination
pop
:>
terminator chosen destination
push-all
terminator destination
push
chosen
length
"hoisted"
loop-optimization-statistics
get
at
0
or
+
"hoisted"
loop-optimization-statistics
get
set-at
cfg
cfg-changed
cfg
predecessors-changed
;