Handbook
Glossary
apply-global-split ( interval plan -- )
Vocabulary
compiler
.
cfg
.
register-allocation
.
greedy
Inputs
interval
an
object
plan
an
object
Outputs
None
Definition
USING:
accessors
assocs
compiler.cfg.linear-scan.allocation.state
compiler.cfg.register-allocation.rematerialization
compiler.cfg.registers
kernel
math
namespaces
sequences
;
IN:
compiler.cfg.register-allocation.greedy
::
apply-global-split
( interval plan -- )
interval
greedy-costs
get
delete-at
interval
interval-progress
cascade>>
:>
cascade interval
vreg>>
rematerialization-of
[
drop
]
[
interval
vreg>>
dup
rep-of
assign-spill-slot
drop
]
if*
plan
blocks>>
plan
resident>>
[|
block resident? |
resident?
[
interval block
region-fragment
:>
fragment fragment
local-stage
advance-stage
cascade fragment
interval-progress
cascade<<
plan
reg>>
fragment
interval-progress
hint<<
fragment plan
reg>>
greedy-assign
"resident-blocks"
greedy-count
]
[
interval block cascade
memory-region-products
]
if
]
2each
plan
cost>>
"region-cut-cost"
greedy-statistics
get
at
0
or
+
"region-cut-cost"
greedy-statistics
get
set-at
"region-splits"
greedy-count
"splits"
greedy-count
;