|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.Analysis.BasicBlockInterfVisitor
harpoon.Analysis.DataFlow.DataFlowBasicBlockVisitor
harpoon.Analysis.DataFlow.BackwardDataFlowBasicBlockVisitor
harpoon.Analysis.DataFlow.LiveVars.BBVisitor
harpoon.Analysis.DataFlow.LiveTemps
public class LiveTemps
LiveTemps
is an extension of LiveVars
for
performing liveness analysis on Temp
s.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class harpoon.Analysis.DataFlow.LiveVars.BBVisitor |
---|
LiveVars.BBVisitor.LiveVarInfo |
Field Summary | |
---|---|
protected SetFactory |
mySetFactory
|
protected UseDefer |
ud
|
Fields inherited from class harpoon.Analysis.DataFlow.LiveVars.BBVisitor |
---|
bbFact |
Constructor Summary | |
---|---|
LiveTemps(BasicBlock.Factory bbFact,
Set liveOnProcExit)
|
|
LiveTemps(BasicBlock.Factory bbFact,
Set liveOnProcExit,
SetFactory tempSetFact,
UseDefer ud)
Constructor for LiveVars that allows the user to pass in their own SetFactory for constructing sets of the
Temp s in the analysis. |
|
LiveTemps(BasicBlock.Factory bbFact,
Set liveOnProcExit,
UseDefer ud)
Constructs a new LiveTemps for basicblocks . |
Method Summary | |
---|---|
String |
dumpElems()
Returns a String containing a human-readable version of the analysis results. |
protected Set |
findUniverse(Set blockSet)
Constructs a Set of all of the Temp s
in blocks . |
Set |
getLiveAfter(HCodeElement hce)
Returns the Set of Temp s that are
live on exit from hce . |
Set |
getLiveBefore(HCodeElement hce)
Returns the Set of Temp s that are
live on on entry to hce . |
static LiveTemps |
make(HCode code,
Set liveOnExit)
Produces a default live variable analysis object and solves it. |
static LiveTemps |
make(HCode code,
UseDefer ud,
Set liveOnExit)
Produces a default live variable analysis object and solves it. |
protected LiveVars.BBVisitor.LiveVarInfo |
makeUseDef(BasicBlock bb,
SetFactory sf)
Initializes the USE/DEF information for 'bb' and stores in in the returned LiveVarInfo . |
void |
solve()
Finds the fixed-point solution for this LiveTemps. |
Methods inherited from class harpoon.Analysis.DataFlow.LiveVars.BBVisitor |
---|
dump, dump, getLiveOnEntry, getLiveOnExit, initializeBBtoLVI, merge, visit |
Methods inherited from class harpoon.Analysis.DataFlow.BackwardDataFlowBasicBlockVisitor |
---|
addSuccessors |
Methods inherited from class harpoon.Analysis.DataFlow.DataFlowBasicBlockVisitor |
---|
db, visit |
Methods inherited from class harpoon.Analysis.BasicBlockInterfVisitor |
---|
visit |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected SetFactory mySetFactory
protected UseDefer ud
Constructor Detail |
---|
public LiveTemps(BasicBlock.Factory bbFact, Set liveOnProcExit, UseDefer ud)
LiveTemps
for basicblocks
.
basicblocks
is a
Iterator
of BasicBlock
s,
ud
contains use/def information for all
of all of the instructions in
basicblocks
.
basicblocks
links to a
BasicBlock
not contained within
basicblocks
BasicBlock
is repeatedly iterated
by basicblocks
basicblocks
BasicBlockVisitor
and initializes its
internal datasets for analysis of the
BasicBlock
s in basicblocks
,
iterating over all of basicblocks
in the
process.
basicblocks
- Iterator
of BasicBlock
s to be analyzed.liveOnProcExit
- Set
of Temp
s that are live on exit from the method (for example, r0 for assembly code).public LiveTemps(BasicBlock.Factory bbFact, Set liveOnProcExit)
public LiveTemps(BasicBlock.Factory bbFact, Set liveOnProcExit, SetFactory tempSetFact, UseDefer ud)
SetFactory
for constructing sets of the
Temp
s in the analysis.
Temp
s in
basicBlocks
are members of the universe for
tempSetFact
.
Method Detail |
---|
public static LiveTemps make(HCode code, UseDefer ud, Set liveOnExit)
ud
to define Temp references in
elements of code
. elements in code
must implement CFGraphable
, and
liveOnExit
must be a Set of Temps (mapped to by
ud
) that are live on exit from
code
.
public void solve()
public static LiveTemps make(HCode code, Set liveOnExit)
code
must implement
UseDefable
, CFGraphable
, etc, and
liveOnExit
must be a Set of Temps that are live
on exit from code
.
public Set getLiveBefore(HCodeElement hce)
Set
of Temp
s that are
live on on entry to hce
.
BasicBlock
s
containing some block that contains hce
,
with this
as the
DataFlowBasicBlockVisitor
.
Set
of
Temp
s that are live on entry to
hce
.
public Set getLiveAfter(HCodeElement hce)
Set
of Temp
s that are
live on exit from hce
.
BasicBlock
s
containing some block that contains hce
,
with this
as the
DataFlowBasicBlockVisitor
.
Set
of
Temp
s that are live on exit from
hce
.
protected Set findUniverse(Set blockSet)
Set
of all of the Temp
s
in blocks
.
blocks
is an Iterator
of
BasicBlock
s.
blocks
blocks
, adding
each instruction's useC() and defC() to a universe of
values, returning the universe after all of the
instructions have been visited.
findUniverse
in class LiveVars.BBVisitor
protected LiveVars.BBVisitor.LiveVarInfo makeUseDef(BasicBlock bb, SetFactory sf)
LiveVarInfo
.
makeUseDef
in class LiveVars.BBVisitor
public String dumpElems()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |