|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jikesrvm.compilers.opt.ir.operand.Operand
org.jikesrvm.compilers.opt.ir.operand.LocationOperand
public final class LocationOperand
Represents a location in memory. Used to keep track of memory aliasing.
Operand| Field Summary | |
|---|---|
static int |
ALENGTH_ACCESS
Enumeration of Access type |
static int |
ARRAY_ACCESS
Enumeration of Access type |
(package private) TypeReference |
arrayElementType
Array element type that corresponds to the type of the array that contains this location; null if this is not an array access. |
static int |
FIELD_ACCESS
Enumeration of Access type |
(package private) FieldReference |
fieldRef
Field that corresponds to this location; null if this is not a field access. |
static int |
JTOC_ACCESS
Enumeration of Access type |
(package private) Offset |
JTOCoffset
JTOC index that corresponds to this location |
static int |
METHOD_ACCESS
Enumeration of Access type |
(package private) MethodOperand |
methOp
Method operand that corresponds to this location; null if this is not a method access. |
static int |
SPILL_ACCESS
Enumeration of Access type |
(package private) int |
spillOffset
Spill offset that corresponds to this location |
(package private) int |
type
The type of this location. |
| Fields inherited from class org.jikesrvm.compilers.opt.ir.operand.Operand |
|---|
instruction |
| Fields inherited from interface org.jikesrvm.compilers.opt.driver.OptConstants |
|---|
EPILOGUE_BCI, EPILOGUE_BLOCK_BCI, EXTANT_ANALYSIS_BCI, INSTRUMENTATION_BCI, MAYBE, METHOD_COUNTER_BCI, NO, OSR_PROLOGUE, PROLOGUE_BCI, PROLOGUE_BLOCK_BCI, RECTIFY_BCI, RUNTIME_SERVICES_BCI, SSA_SYNTH_BCI, SYNCHRONIZED_MONITORENTER_BCI, SYNCHRONIZED_MONITOREXIT_BCI, SYNTH_CATCH_BCI, SYNTH_LOOP_VERSIONING_BCI, UNKNOWN_BCI, YES |
| Constructor Summary | |
|---|---|
LocationOperand()
Constructs a new location operand for array length access. |
|
LocationOperand(FieldReference loc)
Constructs a new location operand with the given field. |
|
LocationOperand(int index)
Constructs a new location operand with the given spill offset. |
|
LocationOperand(MethodOperand m)
Constructs a new location operand with the given method |
|
LocationOperand(Offset jtocOffset)
Constructs a new location operand with the given JTOC offset |
|
LocationOperand(RVMField loc)
Constructs a new location operand with the given field |
|
LocationOperand(TypeReference t)
Constructs a new location operand with the given array element type. |
|
| Method Summary | |
|---|---|
private static boolean |
arrayMayBeAliased(TypeReference t1,
TypeReference t2)
|
LocationOperand |
asALengthAccess()
|
LocationOperand |
asArrayAccess()
|
LocationOperand |
asFieldAccess()
|
LocationOperand |
asJTOCAccess()
|
LocationOperand |
asMethodAccess()
|
LocationOperand |
asSpillAccess()
|
Operand |
copy()
Return a new operand that is semantically equivalent to this. |
TypeReference |
getElementType()
|
FieldReference |
getFieldRef()
|
Offset |
getJTOCoffset()
|
int |
getOffset()
|
TypeReference |
getType()
Return the TypeReference of the value represented by the operand. |
boolean |
isALengthAccess()
|
boolean |
isArrayAccess()
|
boolean |
isFieldAccess()
|
boolean |
isJTOCAccess()
|
boolean |
isMethodAccess()
|
boolean |
isSpillAccess()
|
static boolean |
mayBeAliased(LocationOperand op1,
LocationOperand op2)
Returns true if operands op1 and op2 may be aliased. |
boolean |
mayBeVolatile()
Is the accessed location possibly volatile? |
boolean |
similar(Operand op)
Are two operands semantically equivalent? |
String |
toString()
Returns the string representation of this operand. |
| Methods inherited from class org.jikesrvm.compilers.opt.ir.operand.Operand |
|---|
asAddressConstant, asBlock, asBranch, asClassConstant, asCondition, asDoubleConstant, asFloatConstant, asIntConstant, asLocation, asLongConstant, asMemory, asMethod, asNullConstant, asObjectConstant, asRegister, asStackLocation, asStringConstant, asTIBConstant, asType, conservativelyApproximates, getIndexInInstruction, isAddress, isAddressConstant, isBlock, isBranch, isClassConstant, isConstant, isDefinitelyNull, isDouble, isDoubleConstant, isFloat, isFloatConstant, isInt, isIntConstant, isIntLike, isLocation, isLong, isLongConstant, isMemory, isMethod, isMovableObjectConstant, isNullConstant, isObjectConstant, isRef, isRegister, isStackLocation, isStringConstant, isTIBConstant, isTrueGuard, isType, meet |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int FIELD_ACCESS
public static final int ARRAY_ACCESS
public static final int JTOC_ACCESS
public static final int SPILL_ACCESS
public static final int ALENGTH_ACCESS
public static final int METHOD_ACCESS
int type
FieldReference fieldRef
MethodOperand methOp
TypeReference arrayElementType
Offset JTOCoffset
int spillOffset
| Constructor Detail |
|---|
public LocationOperand(FieldReference loc)
loc - locationpublic LocationOperand(RVMField loc)
loc - locationpublic LocationOperand(MethodOperand m)
m - Method operand that corresponds to this locationpublic LocationOperand(TypeReference t)
t - Array element typepublic LocationOperand(Offset jtocOffset)
public LocationOperand(int index)
public LocationOperand()
| Method Detail |
|---|
public TypeReference getType()
TypeReference of the value represented by the operand.
getType in class OperandOptimizingCompilerExceptionpublic LocationOperand asFieldAccess()
public LocationOperand asArrayAccess()
public LocationOperand asJTOCAccess()
public LocationOperand asSpillAccess()
public LocationOperand asALengthAccess()
public LocationOperand asMethodAccess()
public FieldReference getFieldRef()
public TypeReference getElementType()
public Offset getJTOCoffset()
public int getOffset()
public boolean isFieldAccess()
public boolean isArrayAccess()
public boolean isJTOCAccess()
public boolean isSpillAccess()
public boolean isALengthAccess()
public boolean isMethodAccess()
public boolean mayBeVolatile()
public Operand copy()
this.
copy in class Operandthis
private static boolean arrayMayBeAliased(TypeReference t1,
TypeReference t2)
public static boolean mayBeAliased(LocationOperand op1,
LocationOperand op2)
op1 - the first operandop2 - the second operand
true if the operands might be aliased or
false if they are definitely not aliasedpublic boolean similar(Operand op)
similar in class Operandop - other operand
true if this and op
are semantically equivalent or false
if they are not.public String toString()
toString in class Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||