Handbook
Glossary
##shr-imm
Basic block instructions
Prev:
##shr
Next:
##sub
Vocabulary
compiler
.
cfg
.
instructions
Definition
IN:
compiler.cfg.instructions
TUPLE:
##shr-imm
<
foldable-insn
dst src1 src2 insn#
;
Methods
USING:
accessors
compiler.cfg.gvn.avail
compiler.cfg.instructions
kernel
;
M:
##shr-imm
>avail-insn-defs
[
]
change-dst
drop
;
USING:
accessors
compiler.cfg.gvn.avail
compiler.cfg.instructions
kernel
;
M:
##shr-imm
>avail-insn-uses
[
dup
>avail-vreg
or*
]
change-src1
drop
;
USING:
accessors
arrays
compiler.cfg.gvn.expressions
compiler.cfg.gvn.graph
compiler.cfg.instructions
kernel
sequences.private
;
M:
##shr-imm
>expr
\
##shr-imm
swap
[
src1>>
vreg>vn
]
keep
[
src2>>
]
keep
drop
3
f
<array>
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:
##shr-imm
>expr
\
##shr-imm
swap
[
src1>>
vreg>vn
]
keep
[
src2>>
]
keep
drop
3
f
<array>
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:
##shr-imm
assign-insn-defs
[
vreg>reg
]
change-dst
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.linear-scan.assignment
kernel
;
M:
##shr-imm
assign-insn-uses
[
vreg>reg
]
change-src1
drop
;
USING:
compiler.cfg.instructions
compiler.cfg.value-numbering.folding
kernel
layouts
math
math.bitwise
;
M:
##shr-imm
binary-constant-fold*
drop
[
cell-bits
2^
wrap
]
dip
neg
shift
;
USING:
compiler.cfg.gvn.folding
compiler.cfg.instructions
kernel
layouts
math
math.bitwise
;
M:
##shr-imm
binary-constant-fold*
drop
[
cell-bits
2^
wrap
]
dip
neg
shift
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.representations.rewrite
kernel
;
M:
##shr-imm
convert-insn-defs
[
converted-value
]
change-dst
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.representations.rewrite
kernel
;
M:
##shr-imm
convert-insn-uses
[
converted-value
]
change-src1
drop
;
USING:
compiler.cfg.instructions
compiler.cfg.representations.preferred
cpu.architecture
kernel
;
M:
##shr-imm
defs-vreg-reps
drop
{
int-rep
}
;
USING:
accessors
arrays
compiler.cfg.def-use
compiler.cfg.instructions
;
M:
##shr-imm
defs-vregs
dst>>
1array
;
USING:
accessors
compiler.cfg.instructions
compiler.codegen
cpu.architecture
kernel
;
M:
##shr-imm
generate-insn
[
dst>>
]
keep
[
src1>>
]
keep
[
src2>>
]
keep
drop
%shr-imm
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.renaming
kernel
;
M:
##shr-imm
rename-insn-defs
[
rename-value
]
change-dst
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.renaming
kernel
;
M:
##shr-imm
rename-insn-uses
[
rename-value
]
change-src1
drop
;
USING:
accessors
combinators
compiler.cfg.gvn.avail
compiler.cfg.gvn.folding
compiler.cfg.gvn.graph
compiler.cfg.gvn.math
compiler.cfg.gvn.rewrite
compiler.cfg.instructions
kernel
;
M:
##shr-imm
rewrite
{
{
[
dup
src2>>
0
=
]
[
identity
]
}
{
[
dup
binary-constant-fold?
]
[
binary-constant-fold
]
}
{
[
dup
src1>>
vreg>insn
[
##shr-imm?
]
with-available-uses?
]
[
##shr-imm
reassociate-shift
]
}
[
drop
f
]
}
cond
;
USING:
accessors
combinators
compiler.cfg.instructions
compiler.cfg.value-numbering.folding
compiler.cfg.value-numbering.graph
compiler.cfg.value-numbering.math
compiler.cfg.value-numbering.rewrite
kernel
;
M:
##shr-imm
rewrite
{
{
[
dup
src2>>
0
=
]
[
identity
]
}
{
[
dup
binary-constant-fold?
]
[
binary-constant-fold
]
}
{
[
dup
src1>>
vreg>insn
##shr-imm?
]
[
##shr-imm
reassociate-shift
]
}
[
drop
f
]
}
cond
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.ssa.construction.private
kernel
;
M:
##shr-imm
ssa-rename-insn-defs
[
gen-name
]
change-dst
drop
;
USING:
accessors
compiler.cfg.instructions
compiler.cfg.ssa.construction.private
kernel
;
M:
##shr-imm
ssa-rename-insn-uses
[
top-name
]
change-src1
drop
;
USING:
compiler.cfg.instructions
compiler.cfg.representations.preferred
cpu.architecture
kernel
;
M:
##shr-imm
uses-vreg-reps
drop
{
int-rep
}
;
USING:
accessors
arrays
compiler.cfg.def-use
compiler.cfg.instructions
;
M:
##shr-imm
uses-vregs
src1>>
1array
;