|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.Analysis.Quads.SCC.SCCAnalysis
public class SCCAnalysis
SCCAnalysis
implements Sparse Conditional Constant Propagation,
with extensions to allow type and bitwidth analysis. Fun, fun, fun.
Only works with quads in SSI form.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface harpoon.Analysis.Maps.ExactTypeMap |
---|
ExactTypeMap.ExactType |
Nested classes/interfaces inherited from interface harpoon.Analysis.Maps.TypeMap |
---|
TypeMap.TypeNotKnownException |
Constructor Summary | |
---|---|
SCCAnalysis(HCode hc)
Creates a SCC , and uses UseDef for the
UseDefMap . |
|
SCCAnalysis(HCode hc,
UseDefMap usedef)
Creates a SCC . |
Method Summary | |
---|---|
Object |
constMap(HCodeElement hce,
Temp t)
Determine the constant value of Temp t . |
boolean |
execMap(HCodeEdge edge)
Determine whether Edge e
is executable. |
boolean |
execMap(HCodeElement quad)
Determine whether Quad q
is executable. |
boolean |
isConst(HCodeElement hce,
Temp t)
Determine whether Temp t
has a constant value. |
boolean |
isExactType(HCodeElement hce,
Temp t)
Determine whether the static type of Temp t
defined at hce is exact (or whether the runtime type
could be a subclass of the static type). |
boolean |
isPossiblyNull(HCodeElement hce,
Temp t)
Determine whether the given Temp can possibly be
null . |
int |
minusWidthMap(HCodeElement hce,
Temp t)
Determine the negative bit width of Temp t . |
int |
plusWidthMap(HCodeElement hce,
Temp t)
Determine the positive bit width of Temp t . |
HClass |
typeMap(HCodeElement hce,
Temp t)
Determine the static type of Temp t in
HMethod m . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SCCAnalysis(HCode hc, UseDefMap usedef)
SCC
.
public SCCAnalysis(HCode hc)
SCC
, and uses UseDef
for the
UseDefMap
.
Method Detail |
---|
public boolean execMap(HCodeElement quad)
Quad
q
is executable.
execMap
in interface ExecMap
quad
- The HCodeElement
to examine.
true
if it is possible to execute this
HCodeElement
; or false
if
it can be proved that this HCodeElement
will never be executed.public boolean execMap(HCodeEdge edge)
Edge
e
is executable.
execMap
in interface ExecMap
edge
- An edge between two HCodeElement
s in
some HCode
.
true
if it is possible to traverse this
edge during execution, or false
if it
can be proved that this edge will never be followed.public HClass typeMap(HCodeElement hce, Temp t)
Temp
t
in
HMethod
m
.
typeMap
in interface TypeMap
hce
- The HCodeElement
defining t
.t
- The temporary to examine.
t
.public boolean isExactType(HCodeElement hce, Temp t)
Temp
t
defined at hce
is exact (or whether the runtime type
could be a subclass of the static type).
isExactType
in interface ExactTypeMap
hce
- The HCodeElement
defining t
for
this request.t
- The Temp
to examine.
true
if t
's type is exact,
false
otherwise.public boolean isPossiblyNull(HCodeElement hce, Temp t)
Temp
can possibly be
null
.
public boolean isConst(HCodeElement hce, Temp t)
Temp
t
has a constant value.
isConst
in interface ConstMap
hce
- the definition point.t
- the Temp
to be examined.
true
is the given definition point can
be proven to give the specified Temp
a
constant value, false
otherwise.public Object constMap(HCodeElement hce, Temp t)
Temp
t
.
constMap
in interface ConstMap
hce
- the definition point.t
- the temporary to be examined.
Error
- if Temp
t
is not a constant.public int plusWidthMap(HCodeElement hce, Temp t)
Temp
t
.
public int minusWidthMap(HCodeElement hce, Temp t)
Temp
t
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |