Handbook
Glossary
chordal-allocation-with-registers ( cfg available -- )
Vocabulary
compiler
.
cfg
.
register-allocation
.
chordal
Inputs
cfg
an
object
available
an
object
Outputs
None
Definition
USING:
accessors
assocs
compiler.cfg.instructions
compiler.cfg.linear-scan.allocation.state
compiler.cfg.linear-scan.checker
compiler.cfg.linear-scan.live-intervals
compiler.cfg.linear-scan.numbering
compiler.cfg.linearization
compiler.cfg.register-allocation.chordal.bases
compiler.cfg.register-allocation.chordal.spilling
compiler.cfg.register-allocation.ssa
compiler.cfg.register-allocation.ssa.liveness
compiler.cfg.register-allocation.ssa.phases
compiler.cfg.registers
compiler.cfg.ssa.destruction.leaders
kernel
namespaces
sequences
;
IN:
compiler.cfg.register-allocation.chordal
::
chordal-allocation-with-registers
( cfg available -- )
f
leader-map
set
cfg
construct-ssa-bases
cfg
compute-ssa-live-sets
cfg available
spill-ssa
:>
( fixed statistics ) statistics
chordal-statistics
set
representations
get
keys
[
dup
]
H{
}
map>assoc
leader-map
set
available
registers
set
cfg
compute-ssa-live-sets-preserving-gc
cfg
linearization-order
0
[
instructions>>
[
number-instruction
]
each
]
reduce
drop
chordal-witness?
get
[
available
[
length
]
assoc-map
"register-capacities"
statistics
set-at
cfg
cfg>insns
[
##spill?
]
count
"source-stores-before-color"
statistics
set-at
cfg
cfg>insns
[
##reload?
]
count
"source-reloads-before-color"
statistics
set-at
fixed
assoc-size
"fixed-memory-values"
statistics
set-at
]
when
cfg fixed
compute-phase-ssa-intervals-with-locations
[
live-interval-state?
]
filter
:>
intervals intervals cfg available
assign-certified-colors
check-allocation?
get
[
intervals available
check-allocated-intervals
]
when
cfg intervals fixed
assign-phase-ssa-registers-with-locations
cfg
resolve-ssa-data-flow
cfg
check-numbering
;