[Instructions] [Search] [Current] [Syllabus] [Handouts] [Outlines] [Assignments]
Held Monday, November 23, 1998
Notes
irtframe.c and IRTFrame.java.
However, these will necessarily rely on stuff you haven't written
yet. Do you want different versions, for different stages of your
compilers?
MOVE(
MEM(
ESEQ(
SEQ(
CJUMP(
LT,
TEMP(i),
CONST(0),
L(out)
L(ok)),
LABEL(ok)),
TEMP(i))),
CONST(1))
BINOP(
PLUS,
CALL(NAME(f), [TEMP(x)]),
CALL(
NAME(g),
[ ESEQ(
MOVE(TEMP(x), CONST(0)),
TEMP(x)) ]))
JUMP or CJUMP,
and that falls at the end.
JUMPs and CJUMPs in the program go to the
beginning of the block (or to nowhere in the block).
JUMP or CJUMP,
and nothing jumps to the subsequent instruction (or sequence of instructions),
then we can tie it all together in one basic block.
JUMP or CJUMP
JUMPs, or CJUMPs.
JUMP or
CJUMP, so it's best to assume that code can branch to the
label.)
JUMP or CJUMP, end the
current block and begin a new block.
JUMP and CJUMP can only appear at the
end of the block.
JUMP next-block at the end of any
block that doesn't have a JUMP or CJUMP
at the end.
MOVE alpha beta JUMP l123 MOVE beta gamma
JUMP, but it
doesn't have a label. (It's arguable that it can never be executed,
but we'll leave that as an issue for later.)
MOVE alpha beta LABEL l432 MOVE beta gamma
JUMP l432 so that we can successfully rearrange the blocks.
JUMP l.
History
Back to Canonicalizing trees, continued. On to Special topic: Interpreting IRTs.
[Instructions] [Search] [Current] [Syllabus] [Handouts] [Outlines] [Assignments]
Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.
Source text last modified Mon Nov 30 10:13:07 1998.
This page generated on Mon Nov 30 10:54:00 1998 by SiteWeaver.
Contact our webmaster at rebelsky@math.grin.edu