|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.Analysis.Maps.Derivation.DList
public static class Derivation.DList
Structure of the derivation information.
Given three Temp
s t1
, t2
,
and t3
, a derived pointer d
whose value
can be described by the equation:
d = K + t1 - t2 + t3for some (non-constant) integer K at every point during runtime can be represented as the
DList
new DList(t1, true, new DList(t2, false, new DList(t3, true))).
NOTE that the temporaries named in the DList
refer to the reaching definitions of those temporaries at
the definition point of the variable with the derived
type. In SSI/SSA forms, this does not matter, as every variable
has exactly one reaching definition, but in other forms it
is the responsibility of the implementor to ensure that the
base pointers are not overwritten while the derived value is
live.
ALSO NOTE that the temporaries named in the
DList
are base pointers -- that is,
they have pure types, not derived types. In particular,
the derivation()
method applied to any temporary
named in a DList
should return null
.
Derived types derived from other derived types are not allowed.
Field Summary | |
---|---|
Temp |
base
Base pointer. |
Derivation.DList |
next
Pointer to a continuation of the derivation, or null
if there are no more base pointers associated with this derived
pointer. |
boolean |
sign
Sign of base pointer. |
Constructor Summary | |
---|---|
Derivation.DList(Temp base,
boolean sign,
Derivation.DList next)
Constructor. |
Method Summary | |
---|---|
Derivation.DList |
canonicalize()
Canonicalize a DList . |
static Derivation.DList |
clone(Derivation.DList dlist)
Returns a clean copy of this DList . |
boolean |
equals(Object o)
Equality test. |
static Derivation.DList |
rename(Derivation.DList dlist,
TempMap tempMap)
Returns a new DList with the Temp s
renamed by the supplied mapping |
String |
toString()
Returns a human-readable description of this DList . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final Temp base
public final boolean sign
true
if derived pointer
equals offset + base pointer, false
if
derived pointer equals offset - base pointer.
public final Derivation.DList next
null
if there are no more base pointers associated with this derived
pointer.
Constructor Detail |
---|
public Derivation.DList(Temp base, boolean sign, Derivation.DList next)
Method Detail |
---|
public String toString()
DList
.
toString
in class Object
public boolean equals(Object o)
DList
s for strict equality.
equals
in class Object
public Derivation.DList canonicalize()
DList
. The canonicalized
form of a DList
has all components sorted
by Temp
(using the natural ordering of
Temp
s), and is algebraically simplified
--- that is, components with the same Temp
and opposite signs cancel out.
public static Derivation.DList clone(Derivation.DList dlist)
DList
. Does
not rename Temp
s in any way.
public static Derivation.DList rename(Derivation.DList dlist, TempMap tempMap)
DList
with the Temp
s
renamed by the supplied mapping
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |