|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.IR.Assem.Instr
harpoon.IR.Assem.InstrJUMP
public class InstrJUMP
InstrJUMP
represents a shift in control flow to one
target Label
with no side-effects. This instruction
is being specialized to allow for easier detection of JUMPs which
could guide optimizations (mainly in laying out basic blocks to
allow for elimination of unnecessary JUMPs.)
Execution of an InstrJUMP
should have no side-effects
other than changing the Program Counter to the target location in
the code. Thus, InstrJUMP
s can be eliminated if
control would already flow through the code in the same way
without the JUMP in place.
Field Summary |
---|
Fields inherited from class harpoon.IR.Assem.Instr |
---|
arrayFactory, canFallThrough, next, prev |
Constructor Summary | |
---|---|
InstrJUMP(InstrFactory inf,
HCodeElement source,
String assem,
Label target)
Creates a InstrJUMP . |
Method Summary | |
---|---|
void |
accept(InstrVisitor v)
Accept a visitor. |
Instr |
cloneMutateAssem(InstrFactory inf,
String newAssem)
Clones this, mutating the assembly string. |
boolean |
isJump()
Returns true if this is an unconditional Jump. |
Instr |
rename(InstrFactory inf,
TempMap defMap,
TempMap useMap)
Create a new Instr identical to the receiver, but
with all Temp s renamed according to the given
mappings. |
Methods inherited from class harpoon.IR.Assem.Instr |
---|
cloneMutateAssem, def, defC, edgeC, edges, getAssem, getEntry, getExit, getFactory, getGroups, getID, getInstrFor, getLineNumber, getNext, getPrev, getSourceFile, getTargets, hashCode, hasModifiableTargets, hasMultiplePredecessors, insertAt, insertInstrsAt, isDirective, isDummy, isLabel, isMove, isPred, isSucc, layout, map, map, map, pred, predC, remove, rename, rename, replace, replaceInstrList, setGroup, succ, succC, toString, use, useC |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public InstrJUMP(InstrFactory inf, HCodeElement source, String assem, Label target)
InstrJUMP
.
Method Detail |
---|
public Instr cloneMutateAssem(InstrFactory inf, String newAssem)
Instr
this
(use/def, isMove, etc), but instead of
having the assembly-string of this, it has
newAssem
as its assembly string. The
generated instr will not have a a place in the
instruction layout; it is the responsiblity of the caller
to subsequently call Instr.replace to swap
this
and the returned Instr
.
cloneMutateAssem
in class Instr
public Instr rename(InstrFactory inf, TempMap defMap, TempMap useMap)
Instr
Instr
identical to the receiver, but
with all Temp
s renamed according to the given
mappings. The new Instr
will have no edges, and
will come from the specified InstrFactory
.
FSK: I don't think this "no edges" part of the specification
holds anymore (it was written before we revised the
control-flow representation in the Instrs...
rename
in class Instr
public void accept(InstrVisitor v)
Instr
accept
in class Instr
public boolean isJump()
Instr
Label
with no side-effects.
isJump
in class Instr
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |