Handbook
Glossary
##compare
Basic block instructions
Prev:
<gc-map> ( -- gc-map )
Next:
##compare-imm
Vocabulary
compiler
.
cfg
.
instructions
Definition
IN:
compiler.cfg.instructions
TUPLE:
##compare
<
foldable-insn
dst src1 src2 cc temp insn#
;
Methods
USING:
accessors
compiler.cfg.gvn.avail
compiler.cfg.instructions
kernel
;
M:
##compare
>avail-insn-defs
[
]
change-dst
drop
;
USING:
accessors
compiler.cfg.gvn.avail
compiler.cfg.instructions
kernel
;
M:
##compare
>avail-insn-temps
[
]
change-temp
drop
;
USING:
accessors
compiler.cfg.gvn.avail
compiler.cfg.instructions
kernel
;
M:
##compare
>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
>expr
\
##compare
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
>expr
\
##compare
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.alias-analysis
compiler.cfg.instructions
generic
kernel
;
M:
##compare
analyze-aliases
M\
##compare
analyze-aliases
(call-next-method)
dup
useless-compare?
[
dst>>
f
##load-reference
new-insn
analyze-aliases
]
when
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.linear-scan.assignment
kernel
;
M:
##compare
assign-insn-defs
[
vreg>reg
]
change-dst
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.linear-scan.assignment
kernel
;
M:
##compare
assign-insn-temps
[
vreg>reg
]
change-temp
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.linear-scan.assignment
kernel
;
M:
##compare
assign-insn-uses
[
vreg>reg
]
change-src1
[
vreg>reg
]
change-src2
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.representations.rewrite
kernel
;
M:
##compare
convert-insn-defs
[
converted-value
]
change-dst
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.representations.rewrite
kernel
;
M:
##compare
convert-insn-temps
[
]
change-temp
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.representations.rewrite
kernel
;
M:
##compare
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
defs-vreg-reps
drop
{
tagged-rep
}
;
USING:
accessors
arrays
compiler.cfg.def-use
compiler.cfg.instructions
;
M:
##compare
defs-vregs
dst>>
1array
;
USING:
accessors
compiler.cfg.instructions
compiler.codegen
cpu.architecture
kernel
;
M:
##compare
generate-insn
[
dst>>
]
keep
[
src1>>
]
keep
[
src2>>
]
keep
[
cc>>
]
keep
[
temp>>
]
keep
drop
%compare
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.renaming
kernel
;
M:
##compare
rename-insn-defs
[
rename-value
]
change-dst
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.registers
compiler.cfg.renaming
kernel
;
M:
##compare
rename-insn-temps
[
drop
next-vreg
]
change-temp
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.renaming
kernel
;
M:
##compare
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
rewrite
{
{
[
dup
src1>>
vreg-immediate-comparand?
]
[
t
>compare-imm
]
}
{
[
dup
src2>>
vreg-immediate-comparand?
]
[
f
>compare-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
rewrite
{
{
[
dup
src1>>
vreg-immediate-comparand?
]
[
t
>compare-imm
]
}
{
[
dup
src2>>
vreg-immediate-comparand?
]
[
f
>compare-imm
]
}
{
[
dup
diagonal?
]
[
rewrite-self-compare
]
}
[
drop
f
]
}
cond
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.ssa.construction.private
kernel
;
M:
##compare
ssa-rename-insn-defs
[
gen-name
]
change-dst
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.ssa.construction.private
kernel
;
M:
##compare
ssa-rename-insn-temps
[
]
change-temp
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.ssa.construction.private
kernel
;
M:
##compare
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
temp-vreg-reps
drop
{
int-rep
}
;
USING:
accessors
arrays
compiler.cfg.def-use
compiler.cfg.instructions
;
M:
##compare
temp-vregs
temp>>
1array
;
USING:
compiler.cfg.instructions
compiler.cfg.representations.preferred
cpu.architecture
kernel
;
M:
##compare
uses-vreg-reps
drop
{
tagged-rep
tagged-rep
}
;
USING:
accessors
arrays
compiler.cfg.def-use
compiler.cfg.instructions
kernel
;
M:
##compare
uses-vregs
[
src1>>
]
[
src2>>
]
bi
2array
;