Handbook
Glossary
##compare-integer
Basic block instructions
Prev:
##compare-imm-branch
Next:
##compare-integer-branch
Vocabulary
compiler
.
cfg
.
instructions
Class description
This instruction is emitted for
fixnum
comparisons.
See also
emit-fixnum-comparison
Definition
IN:
compiler.cfg.instructions
TUPLE:
##compare-integer
<
foldable-insn
dst src1 src2 cc temp insn#
;
Methods
USING:
accessors
compiler.cfg.gvn.avail
compiler.cfg.instructions
kernel
;
M:
##compare-integer
>avail-insn-defs
[
]
change-dst
drop
;
USING:
accessors
compiler.cfg.gvn.avail
compiler.cfg.instructions
kernel
;
M:
##compare-integer
>avail-insn-temps
[
]
change-temp
drop
;
USING:
accessors
compiler.cfg.gvn.avail
compiler.cfg.instructions
kernel
;
M:
##compare-integer
>avail-insn-uses
[
dup
>avail-vreg
or*
]
change-src1
[
dup
>avail-vreg
or*
]
change-src2
drop
;
USING:
accessors
arrays
compiler.cfg.gvn.expressions
compiler.cfg.gvn.graph
compiler.cfg.instructions
kernel
sequences.private
;
M:
##compare-integer
>expr
\
##compare-integer
swap
[
src1>>
vreg>vn
]
keep
[
src2>>
vreg>vn
]
keep
[
cc>>
]
keep
drop
4
f
<array>
3
swap
[
set-array-nth
]
keep
2
swap
[
set-array-nth
]
keep
1
swap
[
set-array-nth
]
keep
0
swap
[
set-array-nth
]
keep
;
USING:
accessors
arrays
compiler.cfg.instructions
compiler.cfg.value-numbering.expressions
compiler.cfg.value-numbering.graph
kernel
sequences.private
;
M:
##compare-integer
>expr
\
##compare-integer
swap
[
src1>>
vreg>vn
]
keep
[
src2>>
vreg>vn
]
keep
[
cc>>
]
keep
drop
4
f
<array>
3
swap
[
set-array-nth
]
keep
2
swap
[
set-array-nth
]
keep
1
swap
[
set-array-nth
]
keep
0
swap
[
set-array-nth
]
keep
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.linear-scan.assignment
kernel
;
M:
##compare-integer
assign-insn-defs
[
vreg>reg
]
change-dst
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.linear-scan.assignment
kernel
;
M:
##compare-integer
assign-insn-temps
[
vreg>reg
]
change-temp
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.linear-scan.assignment
kernel
;
M:
##compare-integer
assign-insn-uses
[
vreg>reg
]
change-src1
[
vreg>reg
]
change-src2
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.representations.rewrite
kernel
;
M:
##compare-integer
convert-insn-defs
[
converted-value
]
change-dst
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.representations.rewrite
kernel
;
M:
##compare-integer
convert-insn-temps
[
]
change-temp
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.representations.rewrite
kernel
;
M:
##compare-integer
convert-insn-uses
[
converted-value
]
change-src1
[
converted-value
]
change-src2
drop
;
USING:
compiler.cfg.instructions
compiler.cfg.representations.preferred
cpu.architecture
kernel
;
M:
##compare-integer
defs-vreg-reps
drop
{
tagged-rep
}
;
USING:
accessors
arrays
compiler.cfg.def-use
compiler.cfg.instructions
;
M:
##compare-integer
defs-vregs
dst>>
1array
;
USING:
accessors
compiler.cfg.instructions
compiler.codegen
cpu.architecture
kernel
;
M:
##compare-integer
generate-insn
[
dst>>
]
keep
[
src1>>
]
keep
[
src2>>
]
keep
[
cc>>
]
keep
[
temp>>
]
keep
drop
%compare
;
USING:
combinators
combinators.short-circuit
compiler.cfg.instructions
compiler.cfg.representations.peephole
generic
kernel
;
M:
##compare-integer
optimize-insn
{
{
[
dup
{
[
src1-tagged?
]
[
src2-tagged?
]
}
1&&
]
[
unchanged
]
}
[
M\
##compare-integer
optimize-insn
(call-next-method)
]
}
cond
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.renaming
kernel
;
M:
##compare-integer
rename-insn-defs
[
rename-value
]
change-dst
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.registers
compiler.cfg.renaming
kernel
;
M:
##compare-integer
rename-insn-temps
[
drop
next-vreg
]
change-temp
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.renaming
kernel
;
M:
##compare-integer
rename-insn-uses
[
rename-value
]
change-src1
[
rename-value
]
change-src2
drop
;
USING:
accessors
combinators
compiler.cfg.gvn.comparisons
compiler.cfg.gvn.math
compiler.cfg.gvn.rewrite
compiler.cfg.instructions
kernel
;
M:
##compare-integer
rewrite
{
{
[
dup
src1>>
vreg-immediate-arithmetic?
]
[
t
>compare-integer-imm
]
}
{
[
dup
src2>>
vreg-immediate-arithmetic?
]
[
f
>compare-integer-imm
]
}
{
[
dup
diagonal?
]
[
rewrite-self-compare
]
}
[
drop
f
]
}
cond
;
USING:
accessors
combinators
compiler.cfg.instructions
compiler.cfg.value-numbering.comparisons
compiler.cfg.value-numbering.math
compiler.cfg.value-numbering.rewrite
kernel
;
M:
##compare-integer
rewrite
{
{
[
dup
src1>>
vreg-immediate-arithmetic?
]
[
t
>compare-integer-imm
]
}
{
[
dup
src2>>
vreg-immediate-arithmetic?
]
[
f
>compare-integer-imm
]
}
{
[
dup
diagonal?
]
[
rewrite-self-compare
]
}
[
drop
f
]
}
cond
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.ssa.construction.private
kernel
;
M:
##compare-integer
ssa-rename-insn-defs
[
gen-name
]
change-dst
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.ssa.construction.private
kernel
;
M:
##compare-integer
ssa-rename-insn-temps
[
]
change-temp
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.ssa.construction.private
kernel
;
M:
##compare-integer
ssa-rename-insn-uses
[
top-name
]
change-src1
[
top-name
]
change-src2
drop
;
USING:
compiler.cfg.instructions
compiler.cfg.representations.preferred
cpu.architecture
kernel
;
M:
##compare-integer
temp-vreg-reps
drop
{
int-rep
}
;
USING:
accessors
arrays
compiler.cfg.def-use
compiler.cfg.instructions
;
M:
##compare-integer
temp-vregs
temp>>
1array
;
USING:
compiler.cfg.instructions
compiler.cfg.representations.preferred
cpu.architecture
kernel
;
M:
##compare-integer
uses-vreg-reps
drop
{
int-rep
int-rep
}
;
USING:
accessors
arrays
compiler.cfg.def-use
compiler.cfg.instructions
kernel
;
M:
##compare-integer
uses-vregs
[
src1>>
]
[
src2>>
]
bi
2array
;