public class LiveLocalStoreAnalysis extends BackwardDataflowAnalysis<BitSet> implements Debug
This analysis also computes which stores that were killed by a subsequent store on any subsequent reachable path. (The FindDeadLocalStores detector uses this information to reduce false positives.)
VERIFY_INTEGRITY| Constructor and Description |
|---|
LiveLocalStoreAnalysis(org.apache.bcel.generic.MethodGen methodGen,
ReverseDepthFirstSearch rdfs,
DepthFirstSearch dfs) |
| Modifier and Type | Method and Description |
|---|---|
void |
copy(BitSet source,
BitSet dest)
Copy dataflow facts.
|
BitSet |
createFact()
Create empty (uninitialized) dataflow facts for one program point.
|
String |
factToString(BitSet fact)
Return a String representation of given Fact.
|
void |
initEntryFact(BitSet result)
Initialize the "entry" fact for the graph.
|
boolean |
isFactValid(BitSet fact)
Determine whether the given fact is valid (neither top nor
bottom).
|
boolean |
isStoreAlive(BitSet fact,
int local)
Return whether or not a store of given local is alive.
|
boolean |
isTop(BitSet fact)
Return whether or not given fact is the special TOP value.
|
boolean |
killedByStore(BitSet fact,
int local)
Return whether or not a store of given local was killed by a subsequent
(dominated) store.
|
void |
makeFactTop(BitSet fact)
Make given fact the top value.
|
void |
meetInto(BitSet fact,
Edge edge,
BitSet result)
Meet a dataflow fact associated with an incoming edge into another fact.
|
boolean |
same(BitSet fact1,
BitSet fact2)
Are given dataflow facts the same?
|
void |
transferInstruction(org.apache.bcel.generic.InstructionHandle handle,
BasicBlock basicBlock,
BitSet fact)
Transfer function for a single instruction.
|
getBlockOrder, getReverseDepthFirstSearch, isForwardsgetFactAfterLocation, getFactAtLocation, transferedgeTransfer, finishIteration, getFactOnEdge, getLastUpdateTimestamp, getResultFact, getStartFact, resultFactIterator, setLastUpdateTimestamp, startIterationpublic LiveLocalStoreAnalysis(org.apache.bcel.generic.MethodGen methodGen,
ReverseDepthFirstSearch rdfs,
DepthFirstSearch dfs)
public BitSet createFact()
DataflowAnalysiscreateFact in interface DataflowAnalysis<BitSet>public void copy(BitSet source, BitSet dest)
DataflowAnalysiscopy in interface DataflowAnalysis<BitSet>public void initEntryFact(BitSet result) throws DataflowAnalysisException
DataflowAnalysisinitEntryFact in interface DataflowAnalysis<BitSet>DataflowAnalysisExceptionpublic void makeFactTop(BitSet fact)
DataflowAnalysismakeFactTop in interface DataflowAnalysis<BitSet>public boolean same(BitSet fact1, BitSet fact2)
DataflowAnalysissame in interface DataflowAnalysis<BitSet>public void meetInto(BitSet fact, Edge edge, BitSet result) throws DataflowAnalysisException
DataflowAnalysismeetInto in interface DataflowAnalysis<BitSet>fact - the predecessor fact (incoming edge)edge - the edge from the predecessorresult - the result factDataflowAnalysisExceptionpublic void transferInstruction(org.apache.bcel.generic.InstructionHandle handle,
BasicBlock basicBlock,
BitSet fact)
throws DataflowAnalysisException
AbstractDataflowAnalysistransferInstruction in class AbstractDataflowAnalysis<BitSet>handle - the instructionbasicBlock - the BasicBlock containing the instruction; needed to
disambiguate instructions in inlined JSR subroutinesfact - which should be modified based on the instructionDataflowAnalysisExceptionpublic boolean isFactValid(BitSet fact)
AbstractDataflowAnalysisisFactValid in class AbstractDataflowAnalysis<BitSet>public String factToString(BitSet fact)
DataflowAnalysisfactToString in interface DataflowAnalysis<BitSet>factToString in class BasicAbstractDataflowAnalysis<BitSet>fact - a dataflow factpublic boolean isTop(BitSet fact)
isTop in interface DataflowAnalysis<BitSet>public boolean isStoreAlive(BitSet fact, int local)
fact - a dataflow fact created by this analysislocal - the localpublic boolean killedByStore(BitSet fact, int local)
Copyright © 2003–2015. All rights reserved.