Handbook
Glossary
try-eliminate-copy ( follower leader must? -- )
Vreg Coalescing
Prev:
try-eliminate-copies ( pairs must? -- )
Vocabulary
compiler
.
cfg
.
ssa
.
destruction
.
coalescing
Inputs
follower
vreg
leader
vreg
must?
a
boolean
Outputs
None
Word description
Tries to eliminate a vreg copy from 'leader' to 'follower'. If 'must?' is
t
then a
vregs-shouldn't-interfere
error is thrown if the vregs interfere.
See also
try-eliminate-copies
,
vregs-interfere?
Definition
USING:
compiler.cfg.ssa.destruction.leaders
kernel
;
IN:
compiler.cfg.ssa.destruction.coalescing
:
try-eliminate-copy
( follower leader must? -- )
-rot
leaders
2dup
=
[
3drop
]
[
2dup
vregs-interfere?
[
drop
rot
[
vregs-shouldn't-interfere
]
[
2drop
]
if
]
[
-rot
coalesce-vregs
drop
]
if
]
if
;