Handbook
Glossary
##test-branch
Basic block instructions
Prev:
##test
Next:
##test-imm
Vocabulary
compiler
.
cfg
.
instructions
Class description
Instruction inserted by the
compiler
.
cfg
.
value-numbering
compiler pass.
See also
##compare-integer-imm-branch
Definition
IN:
compiler.cfg.instructions
TUPLE:
##test-branch
<
vreg-insn
src1 src2 cc insn#
;
Methods
USING:
accessors
compiler.cfg.gvn.avail
compiler.cfg.instructions
kernel
;
M:
##test-branch
>avail-insn-uses
[
dup
>avail-vreg
or*
]
change-src1
[
dup
>avail-vreg
or*
]
change-src2
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.linear-scan.assignment
kernel
;
M:
##test-branch
assign-insn-uses
[
vreg>reg
]
change-src1
[
vreg>reg
]
change-src2
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.representations.rewrite
kernel
;
M:
##test-branch
convert-insn-uses
[
converted-value
]
change-src1
[
converted-value
]
change-src2
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.codegen
cpu.architecture
kernel
;
M:
##test-branch
generate-conditional-insn
[
src1>>
]
keep
[
src2>>
]
keep
[
cc>>
]
keep
drop
%test-branch
;
USING:
combinators
combinators.short-circuit
compiler.cfg.instructions
compiler.cfg.representations.peephole
generic
kernel
;
M:
##test-branch
optimize-insn
{
{
[
dup
{
[
src1-tagged?
]
[
src2-tagged?
]
}
1&&
]
[
unchanged
]
}
[
M\
##test-branch
optimize-insn
(call-next-method)
]
}
cond
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.renaming
kernel
;
M:
##test-branch
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:
##test-branch
rewrite
{
{
[
dup
src1>>
vreg-immediate-comparand?
]
[
t
>test-imm-branch
]
}
{
[
dup
src2>>
vreg-immediate-comparand?
]
[
f
>test-imm-branch
]
}
{
[
dup
diagonal?
]
[
{
{
~quotation~ ~quotation~
}
{
~quotation~ ~quotation~
}
[
drop
f
]
}
cond
]
}
[
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:
##test-branch
rewrite
{
{
[
dup
src1>>
vreg-immediate-comparand?
]
[
t
>test-imm-branch
]
}
{
[
dup
src2>>
vreg-immediate-comparand?
]
[
f
>test-imm-branch
]
}
{
[
dup
diagonal?
]
[
{
{
~quotation~ ~quotation~
}
{
~quotation~ ~quotation~
}
[
drop
f
]
}
cond
]
}
[
drop
f
]
}
cond
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.ssa.construction.private
kernel
;
M:
##test-branch
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:
##test-branch
uses-vreg-reps
drop
{
int-rep
int-rep
}
;
USING:
accessors
arrays
compiler.cfg.def-use
compiler.cfg.instructions
kernel
;
M:
##test-branch
uses-vregs
[
src1>>
]
[
src2>>
]
bi
2array
;