|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object harpoon.IR.Assem.Instr harpoon.IR.Assem.InstrMOVE
public class InstrMOVE
InstrMOVE
represents a copying of a set of source
Temp
s to a set of destination Temp
s.
This instruction is being specialized to allow for easier detection
of MOVEs which could guide optimizations (either in eliminating the
MOVE in question or in choosing which register a given
Temp
would be best assigned to.
Note that InstrMOVE
s at the lowest level represents
the movement of data from register to register, not to
memory (use InstrMEM
for that). However, prior to
register allocation it is legal for InstrMOVE
s to have
non-register Temp
s as their source or destination; the
instruction will simply be replaced later in the compilation with
either a new backend legal InstrMOVE
or
InstrMEM
.
Field Summary |
---|
Fields inherited from class harpoon.IR.Assem.Instr |
---|
arrayFactory, canFallThrough, next, prev |
Constructor Summary | |
---|---|
InstrMOVE(InstrFactory inf,
HCodeElement codeSrc,
String assem,
Temp[] dst,
Temp[] tempSrc)
Creates a InstrMOVE . |
Method Summary | |
---|---|
void |
accept(InstrVisitor v)
Accept a visitor |
Instr |
cloneMutateAssem(InstrFactory inf,
String newAssem)
Clones this, mutating the assembly string. |
boolean |
isMove()
Returns true if this is a Move. |
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, isJump, isLabel, 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 InstrMOVE(InstrFactory inf, HCodeElement codeSrc, String assem, Temp[] dst, Temp[] tempSrc)
InstrMOVE
.
Method Detail |
---|
public void accept(InstrVisitor v)
accept
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 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 boolean isMove()
Instr
Temp
s to a set of destination Temp
s.
isMove
in class Instr
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |