|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.Analysis.Liveness
harpoon.Analysis.DataFlow.LiveVars
public class LiveVars
LiveVars
performs Liveness Analysis for the variables
in the HCode
s passed to it.
It attempts to do this in efficient manner by
BasicBlock
s.
Set
s it works with.
However, the implementation is also meant to be parameterized
and flexible. So it allows the user to pass in their own
CFGrapher
and UseDefer
for the code to be
analyzed.
NOTE: I need to document what constraints there are on
the UseDefer
and CFGrapher
parameters to
preserve the termination guarantees of the analysis. For the time
being, people who have no experience with Dataflow Analysis code
should avoid passing in strange CFGrapher
s and
UseDefer
s
Nested Class Summary | |
---|---|
static class |
LiveVars.BBVisitor
|
Field Summary | |
---|---|
protected static boolean |
DEBUG
|
Fields inherited from class harpoon.Analysis.Liveness |
---|
hc |
Constructor Summary | |
---|---|
LiveVars(HCode hc,
CFGrapher gr,
Set liveOnExit)
Constructs a new LiveVars . |
|
LiveVars(HCode hc,
CFGrapher gr,
UseDefer ud,
Set liveOnExit)
Constructs a new LiveVars . |
Method Summary | |
---|---|
Set |
getLiveIn(HCodeElement hce)
Returns the Set of Temp s
that are live-in at the HCodeElement . |
Set |
getLiveOut(HCodeElement hce)
Returns the Set of Temp s
that are live-out at the HCodeElement . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final boolean DEBUG
Constructor Detail |
---|
public LiveVars(HCode hc, CFGrapher gr, Set liveOnExit)
LiveVars
.
Note that since the dataflow analysis is done during
construction, this can take a while.
Uses the default UseDefer
built into
hc
for its analysis. Requires that elements of
hc
implement UseDefable
.
hc
- Code to be analyzedgr
- Represents control-flow information for hcliveOnExit
- Set of Temps that are live on exit from hcpublic LiveVars(HCode hc, CFGrapher gr, UseDefer ud, Set liveOnExit)
LiveVars
.
Note that since the dataflow analysis is done during
construction, this can take a while.
hc
- Code to be analyzedgr
- Represents control-flow information for hcud
- Represents use/def information for elements of hcliveOnExit
- Set of Temps that are live on exit from hcMethod Detail |
---|
public Set getLiveIn(HCodeElement hce)
Liveness
Set
of Temp
s
that are live-in at the HCodeElement
.
getLiveIn
in class Liveness
public Set getLiveOut(HCodeElement hce)
Liveness
Set
of Temp
s
that are live-out at the HCodeElement
.
getLiveOut
in class Liveness
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |