Handbook
Glossary
loop-entry-candidates ( candidates plan class capacity -- allowed )
Vocabulary
compiler
.
cfg
.
register-allocation
.
chordal
.
spilling
Inputs
candidates
an
object
plan
an
object
class
an
object
capacity
an
object
Outputs
allowed
an
object
Definition
USING:
accessors
assocs
compiler.cfg.def-use
compiler.cfg.loop-detection
compiler.cfg.register-allocation.chordal.spilling.next-use
compiler.cfg.register-allocation.chordal.spilling.residency
kernel
math
math.order
namespaces
sequences
sets
;
IN:
compiler.cfg.register-allocation.chordal.spilling
::
loop-entry-candidates
( candidates plan class capacity -- allowed )
plan
bb>>
loops
get
at
[|
loop |
loop
blocks>>
members
[
spill-plans
get
at
]
map
:>
body body
[
originals>>
[
spill-insn-uses
]
map
concat
]
map
concat
members
:>
loop-uses candidates loop-uses
diff
:>
through body
[|
block |
block
originals>>
[|
insn |
insn block
afters>>
at
keys
insn
uses-vregs
append
insn
defs-vregs
append
insn
temp-vregs
append
members
through
diff
[
register-class
class
=
]
count
]
map
0
[
max
]
reduce
]
map
0
[
max
]
reduce
:>
pressure through
{
}
plan
distances>>
capacity pressure
-
0
max
select-entry-residents
:>
retained candidates through
diff
retained
append
]
[
candidates
]
if*
;