|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
Interface for HIR alias analysis. All future alias analysis classes will implement this interface.
The query interfaces mayAlias, mustAlais, and getAliasGroupFor
all deal with lvalues. An lvalue is an HIR node that is
associated with an object, and its operator code
(see {Link coins.ir.hir.HIR#getOperator}) is one
of HIR.OP_VAR
, HIR.OP_SUBS
,
HIR.OP_QUAL
, HIR.OP_ARROW
,
HIR.OP_CONTENTS
, and HIR.OP_UNDECAY
.
HIR nodes with the operator code HIR.OP_SUBS or HIR.OP_QUAL,
however, are lvalue only when their first child
(specified by {Link coins.ir.hir.SubscriptedExp#getArrayExp}
and {Link coins.ir.hir.Exp#getQualifierExp}, respectively)
is lvalue. To see if an Exp node is lvalue, the isLvalue
method may be used.
フィールドの概要 | |
static java.lang.String |
CATEGORY_NAME
The category name of the alias analysis package. |
メソッドの概要 | |
AliasGroup |
getAliasGroupFor(Exp pExp)
Returns the set of lvalue nodes that are possibly aliased ( mayAlias ) to the specified argument.
|
boolean |
isLvalue(Exp pExp)
Returns true if the specified argument is considered lvalue in this alias analysis. |
boolean |
mayAlias(Exp pExp,
Exp pExp0)
Returns true if the two arguments may
refer to an overlapping area in memory. |
boolean |
mustAlias(Exp pExp,
Exp pExp0)
Returns true if the two arguments
definitely refer to an overlapping area in memory.
|
void |
prepareForAliasAnalHir(SubpDefinition pSubpDef)
Performs alias analysis for the given argument. |
void |
printAliasPairs(SubpDefinition pSubpDef)
Prints out alias pairs in IoRoot.printOut object.
|
フィールドの詳細 |
public static final java.lang.String CATEGORY_NAME
Alias
". Used in debug-tracing.
メソッドの詳細 |
public void prepareForAliasAnalHir(SubpDefinition pSubpDef)
Performs alias analysis for the given argument. After calling this method, the alias analysis object (object that implements this interface) is ready to accept the queries (mayAlias etc.) for the specified argument.
For intraprocedural analyses only (so far).
pSubpDef
- the SubpDefinition
instance
nodes belonging to which are to be analyzed for aliasing.public boolean isLvalue(Exp pExp)
public boolean mayAlias(Exp pExp, Exp pExp0)
true
if the two arguments may
refer to an overlapping area in memory. The two arguments
both must be contained in the SubpDefinition
which was analyzed most recently by this analysis instance.
pExp
- lvalue node to check for aliasing.pExp0
- lvalue node to check for aliasing.
java.lang.IllegalArgumentException
- if either of the arguments
is not lvalue.public boolean mustAlias(Exp pExp, Exp pExp0)
true
if the two arguments
definitely refer to an overlapping area in memory.
The two arguments both must be contained in the
SubpDefinition
which was analyzed most
recently by this analysis instance.
pExp
- lvalue node to check for aliasing.pExp0
- lvalue node to check for aliasing.
java.lang.IllegalArgumentException
- if either of the
arguments is not lvalue.public AliasGroup getAliasGroupFor(Exp pExp)
mayAlias
) to the specified argument.
The argument must be contained in the
SubpDefinition
which was analyzed most recently
by this analysis instance.
pExp
- lvalue node to check for aliasing.
java.lang.IllegalArgumentException
- if the argument
is not lvalue.
See #mayAliaspublic void printAliasPairs(SubpDefinition pSubpDef)
IoRoot.printOut
object.
For debugging.
pSubpDef
- the SubpDefinition
object for
which alias pairs will be printed.
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |