|
|||||||||
| 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 HCodes passed to it.
It attempts to do this in efficient manner by
BasicBlocks.
Sets 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 CFGraphers and
UseDefers
| 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 Temps
that are live-in at the HCodeElement. |
Set |
getLiveOut(HCodeElement hce)
Returns the Set of Temps
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 hc
public 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 hc| Method Detail |
|---|
public Set getLiveIn(HCodeElement hce)
LivenessSet of Temps
that are live-in at the HCodeElement.
getLiveIn in class Livenesspublic Set getLiveOut(HCodeElement hce)
LivenessSet of Temps
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 | ||||||||