Handbook
Glossary
emit-branch ( bb successor -- )
Vocabulary
compiler
.
codegen
Inputs
bb
a
basic-block
successor
a
basic-block
Outputs
None
Word description
Emits a branching instruction for jumping from one block to the next. If the blocks are next to each other, then no jump is needed.
See also
%jump-label
Definition
USING:
cpu.architecture
kernel
;
IN:
compiler.codegen
:
emit-branch
( bb successor -- )
2dup
useless-branch?
[
2drop
]
[
nip
lookup-label
%jump-label
]
if
;