|
|||||||||
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
public abstract static class LiveVars.BBVisitor
Nested Class Summary | |
---|---|
protected static class |
LiveVars.BBVisitor.LiveVarInfo
|
Field Summary | |
---|---|
protected BasicBlock.Factory |
bbFact
|
Constructor Summary | |
---|---|
|
LiveVars.BBVisitor(BasicBlock.Factory bbFact)
Constructs a new LiveVars for basicblocks . |
protected |
LiveVars.BBVisitor(BasicBlock.Factory bbFact,
boolean ignore)
Special ctor for use by subclasses so that the system won't break when calling abstract methods that require data that subclasses haven't initialized yet. |
|
LiveVars.BBVisitor(BasicBlock.Factory bbFact,
SetFactory tempSetFact)
Constructor for LiveVars that allows the user to
pass in their own SetFactory for constructing
sets of whatever variable types that are used in the analysis. |
Method Summary | |
---|---|
String |
dump()
|
String |
dump(boolean dumpInstrs)
|
protected abstract Set |
findUniverse(Set blockSet)
Constructs a Set of all of the referenced
variables in blocks . |
Set |
getLiveOnEntry(BasicBlock b)
Returns the Set of variables that are
live on entry to b . |
Set |
getLiveOnExit(BasicBlock b)
Returns the Set of variables that are
live on exit from b . |
protected void |
initializeBBtoLVI(Set blockSet,
SetFactory setFact)
|
protected abstract LiveVars.BBVisitor.LiveVarInfo |
makeUseDef(BasicBlock bb,
SetFactory sf)
Initializes the USE/DEF information for bb and stores it in the returned LiveVarInfo. |
boolean |
merge(BasicBlockInterf child,
BasicBlockInterf parent)
Merge (Confluence) operator. |
void |
visit(BasicBlock b)
Visit (Transfer) function. |
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 BasicBlock.Factory bbFact
Constructor Detail |
---|
protected LiveVars.BBVisitor(BasicBlock.Factory bbFact, boolean ignore)
public LiveVars.BBVisitor(BasicBlock.Factory bbFact)
LiveVars
for basicblocks
.
bbFact
implement UseDefable
BasicBlockVisitor
and initializes its
internal datasets for analysis of the
BasicBlock
s in bbFact
.
bbFact
- BasicBlock.Factory
containing
BasicBlock
s to be analyzed.public LiveVars.BBVisitor(BasicBlock.Factory bbFact, SetFactory tempSetFact)
LiveVars
that allows the user to
pass in their own SetFactory
for constructing
sets of whatever variable types that are used in the analysis.
Temp
s in bbFact
are
members of the universe for
tempSetFact
.
bbFact
implement UseDefable
BasicBlockVisitor
and initializes its
internal datasets for analysis of the
BasicBlock
s in bbFact
.
Method Detail |
---|
protected void initializeBBtoLVI(Set blockSet, SetFactory setFact)
protected abstract Set findUniverse(Set blockSet)
Set
of all of the referenced
variables in blocks
.
For example, in some analyses this universe will be made up of
all of the Temp
s referenced in
blocks
. However, for flexibility I have allowed
users to define their own universe of values (such as
Web
s).
public boolean merge(BasicBlockInterf child, BasicBlockInterf parent)
parent
corresponds to 'bb' above, while
child
corresponds to a member of Succ('bb'). It
is the responsibility of the DataFlow Equation Solver to run
merge
on all of the Succ('bb')
harpoon.Analysis.DataFlow
package.
child
and parent
are contained in this
to
to
include information associated with
from
merge
in class DataFlowBasicBlockVisitor
InstrSolver
public void visit(BasicBlock b)
visit
in class DataFlowBasicBlockVisitor
protected abstract LiveVars.BBVisitor.LiveVarInfo makeUseDef(BasicBlock bb, SetFactory sf)
Temp
s to make up their
LiveVarInfo
s.
public Set getLiveOnEntry(BasicBlock b)
Set
of variables that are
live on entry to b
.
BasicBlock
s
containing b
with this
as the
DataFlowBasicBlockVisitor
.
public Set getLiveOnExit(BasicBlock b)
Set
of variables that are
live on exit from b
.
BasicBlock
s
containing b
with this
as the
DataFlowBasicBlockVisitor
.
public String dump()
public String dump(boolean dumpInstrs)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |