|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.compilers.opt.ir.Operator
public final class Operator
An Operator represents the operator of an Instruction
.
For each operator in the IR, we create exactly one Operator instance
to represent it. These instances are all stored in static fields
of Operators
. Since only one instance is created for each
semantic operator, they can be compared using ==
.
A common coding practive is to implement the Operators
interface to be able to reference the IR operators within a class
without having to prepend 'Operators.' everywhere.
Operators
,
Instruction
,
OperatorNames
Field Summary | |
---|---|
private static int |
acquire
|
private static int |
alloc
|
private static int |
branch
|
private static int |
call
|
private static int |
commutative
|
private static int |
compare
|
private static int |
conditional
|
private static int |
dynLink
|
private static int |
ethrow
|
byte |
format
Encoding of the operator's InstructionFormat. |
private static int |
fpPop
|
private static int |
fpPush
|
private static int |
immedPEI
|
int |
implicitDefs
Physical registers that are implicitly defined by the operator. |
int |
implicitUses
Physical registers that are implicitly used by the operator. |
private static int |
indirect
|
private static int |
load
|
private static int |
memAsLoad
|
private static int |
memAsStore
|
private static int |
move
|
static int |
none
|
private int |
numberDefs
How many operands of the operator are (pure) defs? |
private int |
numberDefUses
How many operands of the operator are both defs and uses? |
private int |
numberUses
How many operands of the operator are pure uses? |
(package private) OperatorClass |
opClass
Operator Class of the operator; used for instruction scheduling. |
char |
opcode
The operators opcode. |
static Operator[] |
OperatorArray
|
private static int |
release
|
private static int |
ret
|
private static int |
store
|
private int |
traits
encoding of operator traits (characteristics) |
private static int |
tsp
|
static int |
varDefs
|
static int |
varUses
|
private static int |
yieldPoint
|
Constructor Summary | |
---|---|
private |
Operator(char opcode,
byte format,
int traits,
int numDefs,
int numDefUses,
int numUses,
int iDefs,
int iUses)
|
Method Summary | |
---|---|
int |
getNumberOfDefs()
Returns the number of operands that are defs (either pure defs or combined def/uses). |
int |
getNumberOfDefUses()
Returns the number of operands that are defs and uses. |
int |
getNumberOfFixedPureDefs()
Returns the number of operands that are pure defs and are not in the variable-length part of the operand list. |
int |
getNumberOfFixedPureUses()
Returns the number of operands that are pure uses and are not in the variable-length part of the operand list. |
int |
getNumberOfFixedUses()
Returns the number of operands that are uses (either combined use/defs or pure uses) and are not in the variable-length part of the operand list. |
int |
getNumberOfImplicitDefs()
Returns the number of physical registers that are implicitly defined by this operator. |
int |
getNumberOfImplicitUses()
Returns the number of physical registers that are implicitly used by this operator. |
int |
getNumberOfPureDefs()
Returns the number of operands that are defs. |
int |
getNumberOfPureFixedUses()
Returns the number of operands that are pure uses and are not in the variable-length part of the operand list. |
int |
getNumberOfPureUses()
Returns the number of operands that are pure uses. |
int |
getNumberOfUses()
Returns the number of operands that are uses (either combined def/uses or pure uses). |
OperatorClass |
getOpClass()
Gets the operator class. |
boolean |
hasVarDefs()
Can the operator have a variable number of uses? |
boolean |
hasVarUses()
Can the operator have a variable number of uses? |
boolean |
hasVarUsesOrDefs()
Can the operator have a variable number of uses or defs? |
boolean |
isAcquire()
Is the operator an acquire (monitorenter/lock)? |
boolean |
isAllocation()
Is the operator an actual memory allocation instruction (NEW, NEWARRAY, etc)? |
boolean |
isBranch()
Is the operator an intraprocedural branch? |
boolean |
isCall()
Is the operator a call (one kind of interprocedural branch)? |
boolean |
isCommutative()
Is the operator commutative? |
boolean |
isCompare()
Is the operator a compare (val,val) => condition? |
boolean |
isConditionalBranch()
Is the operator a conditional intraprocedural branch? |
boolean |
isConditionalCall()
Is the operator a conditional call? |
boolean |
isDirectBranch()
Is the operator a direct intraprocedural branch? |
boolean |
isDirectCall()
Is the operator a direct call? |
boolean |
isDynamicLinkingPoint()
Could the operator either directly or indirectly cause dynamic class loading? |
boolean |
isExplicitLoad()
Is the operator an explicit load of a finite set of values from a finite set of memory locations (load, load multiple, _not_ call)? |
boolean |
isExplicitStore()
Is the operator an explicit store of a finite set of values to a finite set of memory locations (store, store multiple, _not_ call)? |
boolean |
isFpPop()
Does the operator pop the floating-point stack? |
boolean |
isFpPush()
Does the operator push on the floating-point stack? |
boolean |
isGCPoint()
Is the operator a potential GC point? |
boolean |
isImplicitLoad()
Should the operator be treated as a load from some unknown location(s) for the purposes of scheduling and/or modeling the memory subsystem? |
boolean |
isImplicitStore()
Should the operator be treated as a store to some unknown location(s) for the purposes of scheduling and/or modeling the memory subsystem? |
boolean |
isIndirectBranch()
Is the operator an indirect intraprocedural branch? |
boolean |
isIndirectCall()
Is the operator an indirect call? |
boolean |
isMove()
Does the operator represent a simple move (the value is unchanged) from one "register" location to another "register" location? |
boolean |
isPEI()
Is the operator a PEI (Potentially Excepting Instruction)? |
boolean |
isRelease()
Is the operator a release (monitorexit/unlock)? |
boolean |
isReturn()
Is the operator a return (interprocedural branch)? |
boolean |
isThrow()
Is the operator a throw of a Java exception? |
boolean |
isTSPoint()
is the operator a potential thread switch point? |
boolean |
isUnconditionalBranch()
Is the operator an unconditional intraprocedural branch? |
boolean |
isUnconditionalCall()
Is the operator an unconditional call? |
boolean |
isYieldPoint()
Is the operator a yield point? |
void |
setOpClass(OperatorClass opClass)
Sets the operator class. |
String |
toString()
Returns the string representation of this operator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final char opcode
public final byte format
Instruction
contains an explanation
of the role of InstructionFormats in the IR.
private final int traits
private final int numberDefs
private final int numberDefUses
private final int numberUses
public final int implicitDefs
public final int implicitUses
OperatorClass opClass
public static final int none
private static final int move
private static final int branch
private static final int call
private static final int conditional
private static final int indirect
private static final int load
private static final int memAsLoad
private static final int store
private static final int memAsStore
private static final int ethrow
private static final int immedPEI
private static final int compare
private static final int alloc
private static final int ret
public static final int varUses
public static final int varDefs
private static final int tsp
private static final int acquire
private static final int release
private static final int dynLink
private static final int yieldPoint
private static final int fpPop
private static final int fpPush
private static final int commutative
public static final Operator[] OperatorArray
Constructor Detail |
---|
private Operator(char opcode, byte format, int traits, int numDefs, int numDefUses, int numUses, int iDefs, int iUses)
Method Detail |
---|
public void setOpClass(OperatorClass opClass)
opClass
- operator classpublic OperatorClass getOpClass()
public String toString()
toString
in class Object
public int getNumberOfPureDefs()
public int getNumberOfFixedPureDefs()
public int getNumberOfFixedPureUses()
public int getNumberOfDefUses()
public int getNumberOfPureUses()
public int getNumberOfDefs()
public int getNumberOfUses()
public int getNumberOfPureFixedUses()
public int getNumberOfFixedUses()
public int getNumberOfImplicitDefs()
public int getNumberOfImplicitUses()
public boolean isMove()
true
if the operator is a simple move
or false
if it is not.public boolean isBranch()
true
if the operator is am
intraprocedural branch or false
if it is not.public boolean isConditionalBranch()
true
if the operator is a conditoonal
intraprocedural branch or false
if it is not.public boolean isUnconditionalBranch()
true
if the operator is an unconditional
intraprocedural branch or false
if it is not.public boolean isDirectBranch()
true
if the operator is a direct
intraprocedural branch or false
if it is not.public boolean isIndirectBranch()
true
if the operator is an indirect
interprocedural branch or false
if it is not.public boolean isCall()
true
if the operator is a call
or false
if it is not.public boolean isConditionalCall()
true
if the operator is a
conditional call or false
if it is not.public boolean isUnconditionalCall()
true
if the operator is an unconditional
call or false
if it is not.public boolean isDirectCall()
true
if the operator is a direct call
or false
if it is not.public boolean isIndirectCall()
true
if the operator is an indirect call
or false
if it is not.public boolean isExplicitLoad()
true
if the operator is an explicit load
or false
if it is not.public boolean isImplicitLoad()
true
if the operator is an implicit load
or false
if it is not.public boolean isExplicitStore()
true
if the operator is an explicit store
or false
if it is not.public boolean isImplicitStore()
true
if the operator is an implicit store
or false
if it is not.public boolean isThrow()
true
if the operator is a throw
or false
if it is not.public boolean isPEI()
true
if the operator is a PEI
or false
if it is not.public boolean isGCPoint()
true
if the operator is a potential
GC point or false
if it is not.public boolean isTSPoint()
true
if the operator is a potential
threadswitch point or false
if it is not.public boolean isCompare()
true
if the operator is a compare
or false
if it is not.public boolean isAllocation()
true
if the operator is an allocation
or false
if it is not.public boolean isReturn()
true
if the operator is a return
or false
if it is not.public boolean hasVarUses()
true
if the operator has a variable number
of uses or false
if it does not.public boolean hasVarDefs()
true
if the operator has a variable number
of uses or false
if it does not.public boolean hasVarUsesOrDefs()
true
if the operator has a variable number
of uses or defs or false
if it does not.public boolean isAcquire()
true
if the operator is an acquire
or false
if it is not.public boolean isRelease()
true
if the operator is a release
or false
if it is not.public boolean isDynamicLinkingPoint()
true
if the operator is a dynamic linking point
or false
if it is not.public boolean isYieldPoint()
true
if the operator is a yield point
or false
if it is not.public boolean isFpPop()
true
if the operator pops the floating-point
stack.
or false
if not.public boolean isFpPush()
true
if the operator pushes on the floating-point
stack.
or false
if not.public boolean isCommutative()
true
if the operator is commutative.
or false
if not.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |