Handbook
Glossary
increase-cost ( rep scc factor -- )
Vocabulary
compiler
.
cfg
.
representations
.
selection
Inputs
rep
representation symbol
scc
?
factor
an
integer
Outputs
None
Word description
Increase cost of keeping vreg in rep, making a choice of rep less likely. If the rep is not in the cost alist, it means this representation is prohibited.
Definition
USING:
assocs
compiler.cfg.loop-detection
kernel
math
math.functions
namespaces
;
IN:
compiler.cfg.representations.selection
:
increase-cost
( rep scc factor -- )
[
costs
get
at
2dup
key?
]
dip
[
[
current-loop-nesting
10^
]
]
dip
[
*
+
]
curry
compose
[
change-at
]
curry
[
2drop
]
if
;