Handbook
Glossary
rewrite-into-test? ( insn -- ? )
Vocabulary
compiler
.
cfg
.
value-numbering
.
comparisons
Inputs
insn
an
insn
Outputs
?
a
boolean
Word description
Whether the comparison instruction can be trivially rewritten into a test instruction.
Definition
USING:
accessors
combinators.short-circuit
compiler.cfg.comparisons
cpu.architecture
kernel
sequences
;
IN:
compiler.cfg.value-numbering.comparisons
:
rewrite-into-test?
( insn -- ? )
{
[
drop
test-instruction?
]
[
cc>>
{
cc=
cc/=
}
member-eq?
]
[
src2>>
0
=
]
}
1&&
;