Handbook
Glossary
rewrite-boolean-comparison ( insn -- insn )
Vocabulary
compiler
.
cfg
.
gvn
.
comparisons
Inputs
insn
an
object
Outputs
insn
an
object
Definition
USING:
accessors
combinators
compiler.cfg.gvn.graph
compiler.cfg.instructions
kernel
;
IN:
compiler.cfg.gvn.comparisons
:
rewrite-boolean-comparison
( insn -- insn )
src1>>
vreg>insn
{
{
[
dup
##compare?
]
[
>compare<
##compare-branch
new-insn
]
}
{
[
dup
##compare-imm?
]
[
>compare<
##compare-imm-branch
new-insn
]
}
{
[
dup
##compare-integer?
]
[
>compare<
##compare-integer-branch
new-insn
]
}
{
[
dup
##compare-integer-imm?
]
[
>compare<
##compare-integer-imm-branch
new-insn
]
}
{
[
dup
##test?
]
[
>compare<
##test-branch
new-insn
]
}
{
[
dup
##test-imm?
]
[
>compare<
##test-imm-branch
new-insn
]
}
{
[
dup
##compare-float-unordered?
]
[
>compare<
##compare-float-unordered-branch
new-insn
]
}
{
[
dup
##compare-float-ordered?
]
[
>compare<
##compare-float-ordered-branch
new-insn
]
}
{
[
dup
##test-vector?
]
[
>test-vector<
##test-vector-branch
new-insn
]
}
}
cond
;