|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcoins.aflow.BBlockImpl
| Field Summary | |
protected int |
fBBlockNumber
|
protected IR |
fIrLink
|
FlowRoot |
flowRoot
|
protected BBlock |
fNextInDFO
|
protected BBlock |
fNextInInverseDFO
|
protected java.util.LinkedList |
fPredEdgeList
|
protected java.util.LinkedList |
fPredList
|
(package private) FlowResults |
fResults
|
protected java.util.LinkedList |
fSuccEdgeList
|
protected java.util.LinkedList |
fSuccList
|
protected java.lang.Object |
fWork
|
| Constructor Summary | |
protected |
BBlockImpl(SubpFlow pSubpFlow)
|
| Method Summary | |
void |
addEdge(Exp pConditionalExp,
BBlock pToBlock)
addEdge: Add edge from this block to pToBlock that is to be taken when pConditionalExp is true. |
void |
addToPredList(BBlock pPred)
addToPredList: addToSuccList: Add the basic block pPred/pSucc to the list of predecessors/successors of this basic block, and this block is added to the list of successors/predecessors of pPred/pSucc. |
void |
addToSuccList(BBlock pSucc)
|
void |
changePredEdge(BBlock pBefore,
BBlock pAfter)
|
void |
changeSuccEdge(BBlock pBefore,
BBlock pAfter)
changeEdge: Change the edge between this block and pBefore to a new edge between this block and pAfter. |
void |
deleteBBlock()
deleteBBlock: Delete this block and add successors of this block to the set of successors of all predecessors of this block. |
void |
deleteEdge(BBlock pToBlock)
deleteEdge: Delete the edge from this block to pToBlock and adjust related addresses and links so as to keep consistency. |
void |
deleteFromPredList(BBlock pPred)
deleteFromPredList: deleteFromSuccList: Delete the basic block pPred/pSucc from to the list of predecessors/successors of this basic block, and this block is deleted from the list of successors/predecessors of pPred/pSucc. |
void |
deleteFromSuccList(BBlock pSucc)
|
void |
deleteFromSuccList0(BBlock pSucc)
|
void |
fuseSuccessor(BBlock pToBlock)
fuseSuccessor: Fuse the successor pToBlock with this block and make all successors of pToBlock as successors of this block. |
int |
getBBlockNumber()
getBBlockNumber: Get the block number attached to this basic block. |
ExpVector |
getDAvailIn()
getAvailIn: Get bit vector showing AvailIn set of this block. |
ExpVector |
getDAvailOut()
getAvailOut: Get bit vector showing AvailOut set of this block. |
DefVector |
getDDef()
|
FlowAnalSymVector |
getDDefIn()
getDefIn: Get bit vector showing DefIn set of this block. |
FlowAnalSymVector |
getDDefined()
getDefined: Get bit vector showing Defined set of this block. |
FlowAnalSymVector |
getDDefOut()
getDefOut: Get bit vector showing DefOut set of this block. |
DefVector |
getDef()
getDef: Get bit vector showing Def set of this block. |
ExpVector |
getDEGen()
getEGen: Get bit vector showing EGen set of this block. |
FlowAnalSymVector |
getDExposed()
getExposed: Get bit vector showing Exposed set of this block. |
DefVector |
getDKill()
getKill: Get bit vector showing Kill set of this block. |
java.util.List |
getDomForSubpFlow()
Get the list of BBlocks that dominate this BBlock in the SubpFlow this BBlock belongs to. |
java.util.List |
getDominatedChildrenForSubpFlow()
getDominatedChildren: Get the list of basic blocks immediately dominated by this block. |
FlowAnalSymVector |
getDUsed()
getDUsed: //##12 Get bit vector showing DUsed set of this block. |
BBlock |
getImmediateDominatorForSubpFlow()
getImmediateDominator: Get a basic block immediately dominating this block. |
BBlock |
getImmediatePostdominatorForSubpFlow()
getImmediatePostDominator: Get a basic block immediately post dominating this block. |
IR |
getIrLink()
getIrLink: Get the top-subtree that starts this basic block. |
BBlock |
getNextInDFO()
|
BBlock |
getNextInInverseDFO()
|
DefVector |
getPDef()
getPDef: Get bit vector showing PDef set of this block. |
FlowAnalSymVector |
getPDefined()
getPDefined: Get bit vector showing PDefined set of this block. |
ExpVector |
getPEKill()
getEKill: Get bit vector showing EKill set of this block. |
FlowAnalSymVector |
getPExposed()
getExposed: Get bit vector showing Exposed set of this block. |
DefVector |
getPKill()
getDestroy: Get bit vector showing Destroy set of this block. |
FlowAnalSymVector |
getPLiveIn()
getLiveIn: Get bit vector showing LiveIn set of this block. |
FlowAnalSymVector |
getPLiveOut()
getLiveOut: Get bit vector showing LiveOut set of this block. |
java.util.List |
getPostdomForSubpFlow()
|
java.util.List |
getPostdominatedChildrenForSubpFlow()
getPostDominatedChildren: setPostDominatedChildren: Get/set the list of basic blocks post dominated by this block. |
DefVector |
getPReach()
getReach0: Get bit vector showing Reach0 set of this block. |
Edge |
getPredEdge(BBlock pFromBBlock)
getPredEdge: getSuccEdge: Get the edge corresponding to the predecessor/successor to/from this basic block. |
java.util.List |
getPredList()
getPredList: getSuccList: Get the predecessor/successor list of this basic block. |
FlowAnalSymVector |
getPUsed()
getUsed: //##12 Get bit vector showing Used set of this block. |
DefVector |
getReach()
getReach: Get bit vector showing Reach set of this block. |
SetRefReprList |
getSetRefReprs()
Gets the SetRefReprList object that is the list of SetRefRepr objects, each of which wrap a statement/instruction. |
java.util.List |
getStrictDomForSubpFlow()
Get the strict dominator for this BBlock in the SubpFlow this BBlock belongs to. |
java.util.List |
getStrictPostdomForSubpFlow()
|
SubpFlow |
getSubpFlow()
Returns the SubpFlow object this BBlock belongs to. |
Edge |
getSuccEdge(BBlock pToBBlock)
|
java.util.List |
getSuccList()
|
java.lang.Object |
getWork()
getWork: setWork: get/set information privately used in each phase. |
protected void |
initiateFields()
|
BBlock |
insertConditionalInitPart()
insertConditionalInitPart: Insert a basic block as the conditional initiation block (conditionalInitBlock) of this loop (the loop starting with this basic block having loop header flag). |
BBlock |
insertLoopPreheader()
|
boolean |
isDAvailIn(FlowExpId pExpId)
isAvailIn: See if the expression represented by pExpId is available (value is always computed) at entry to this block. |
boolean |
isDAvailOut(FlowExpId pExpId)
isAvailOut: See if the expression represented by pExpId is available (value is always computed) at exit from this block. |
boolean |
isDDef(SetRefRepr pSetRefRepr)
isDef: See if definition at position pPos is done in this block. |
boolean |
isDDefIn(Sym pSym)
isDefIn: See if pSym is always defined at entry to this block whichever path may be take. |
boolean |
isDDefined(Sym pSym)
isDefined: See if the value of pSym is defined in this block. |
boolean |
isDDefOut(Sym pSym)
isDefOut: See if pSym is always defined at exit from this block. |
boolean |
isDEGen(FlowExpId pExpId)
isEGen: See if expression designated by pReg is generated (computed in this block and afterwards its operand is not changed) in this block. |
boolean |
isDExposed(Sym pSym)
isExposed: See if the variable of pSym is used in this block without setting its value in this block. |
boolean |
isDKill(SetRefRepr pSetRefRepr)
isKill: See if definition at position pPos is killed in this block. |
boolean |
isDUsed(Sym pSym)
isUsed: //##12 See if the value of pSym is used in this block. |
boolean |
isEntryBBlock()
isEntryBlock: See if this block is the entry block in the graph of basic blocks. |
boolean |
isEntryBlock()
|
boolean |
isExitBBlock()
isExitBlock: See if this block is the exit block in the graph of basic blocks. |
boolean |
isExitBlock()
isExitBlock: See if this block is the exit block in the graph of basic blocks. |
boolean |
isPDef(SetRefRepr pSetRefRepr)
|
boolean |
isPDefined(Sym pSym)
isModified: See if the value of pSym is modified in this block. |
boolean |
isPEKill(FlowExpId pExpId)
isEKill: See if expression designated by pReg is killed (its operand is defined) in this block. |
boolean |
isPExposed(Sym pSym)
|
boolean |
isPKill(SetRefRepr pSetRefRepr)
|
boolean |
isPLiveIn(Sym pSym)
isLiveIn: See if pSym is live at entry to this block (value at entry is used in this block or in some successor of this block). |
boolean |
isPLiveOut(Sym pSym)
isLiveOut: See if pSym is live at exit from this block (value at exit is used in some successor of this block). |
boolean |
isPReach(SetRefRepr pSetRefRepr)
isReach: See if definition at position pPos reaches to the entry point of this block. |
boolean |
isPUsed(Sym pSym)
|
void |
printSubtrees()
printSubtrees: Print the sequence of subtrees contained in this block. |
FlowResults |
results()
Returns the FlowResults object that holds data flow information. |
void |
setDAvailIn(ExpVector pVect)
|
void |
setDAvailOut(ExpVector pVect)
|
void |
setDDef(DefVector pVect)
|
void |
setDDefIn(FlowAnalSymVector pVect)
|
void |
setDDefined(FlowAnalSymVector pVect)
|
void |
setDDefOut(FlowAnalSymVector pVect)
|
void |
setDef(DefVector pVect)
|
void |
setDEGen(ExpVector pVect)
|
void |
setDExposed(FlowAnalSymVector pVect)
|
void |
setDKill(DefVector pVect)
|
void |
setDomForSubpFlow(java.util.List pDom)
Set the list of BBlocks that dominate this BBlock in the SubpFlow this BBlock belongs to. |
void |
setDominatedChildrenForSubpFlow(java.util.List pDominatedChildren)
|
void |
setDReach(DefVector pVect)
|
void |
setDUsed(FlowAnalSymVector pVect)
|
void |
setImmediateDominatorForSubpFlow(BBlock pDominator)
|
void |
setImmediatePostdominatorForSubpFlow(BBlock pPostDominator)
|
void |
setNextInDFO(BBlock pNext)
|
void |
setNextInInveseDFO(BBlock pNext)
|
void |
setPDef(DefVector pVect)
|
void |
setPDefined(FlowAnalSymVector pVect)
|
void |
setPEKill(ExpVector pVect)
|
void |
setPExposed(FlowAnalSymVector pVect)
|
void |
setPKill(DefVector pVect)
|
void |
setPLiveIn(FlowAnalSymVector pVect)
|
void |
setPLiveOut(FlowAnalSymVector pVect)
|
void |
setPostdomForSubpFlow(java.util.List pPostdom)
|
void |
setPostdominatedChildrenForSubpFlow(java.util.List pPostDominatedChildren)
|
void |
setPReach(DefVector pVect)
|
void |
setPUsed(FlowAnalSymVector pVect)
|
void |
setReach(DefVector pVect)
|
void |
setSetRefReprs(SetRefReprList pSetRefReprs)
Sets the SetRefReprList object that is the list of SetRefRepr objects, each of which wrap a statement/instruction. |
void |
setWork(java.lang.Object pWork)
|
java.lang.String |
toString()
|
java.lang.String |
toStringDetail()
toStringDetail: //##10 |
java.lang.String |
toStringShort()
toStringShort: //##10 |
java.lang.String |
toStringVeryShort()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface coins.aflow.BBlock |
bblockNodeIterator, bblockSubtreeIterator, getLabel, setIrLink, setRefRepr |
| Field Detail |
public final FlowRoot flowRoot
protected final int fBBlockNumber
protected IR fIrLink
protected java.util.LinkedList fPredList
protected java.util.LinkedList fSuccList
protected java.util.LinkedList fPredEdgeList
protected java.util.LinkedList fSuccEdgeList
protected BBlock fNextInDFO
protected BBlock fNextInInverseDFO
protected java.lang.Object fWork
final FlowResults fResults
| Constructor Detail |
protected BBlockImpl(SubpFlow pSubpFlow)
| Method Detail |
protected void initiateFields()
public IR getIrLink()
BBlock
getIrLink in interface BBlockpublic int getBBlockNumber()
BBlock
getBBlockNumber in interface BBlockpublic FlowResults results()
BBlockFlowResults object that holds data flow information.
results in interface BBlockpublic SetRefReprList getSetRefReprs()
BBlockSetRefReprList object that is the list of SetRefRepr objects, each of which wrap a statement/instruction.
getSetRefReprs in interface BBlockpublic void setSetRefReprs(SetRefReprList pSetRefReprs)
BBlockSetRefReprList object that is the list of SetRefRepr objects, each of which wrap a statement/instruction.
setSetRefReprs in interface BBlockpublic java.util.List getPredList()
BBlock
getPredList in interface BBlockpublic java.util.List getSuccList()
getSuccList in interface BBlockpublic Edge getPredEdge(BBlock pFromBBlock)
BBlock
getPredEdge in interface BBlockpublic Edge getSuccEdge(BBlock pToBBlock)
getSuccEdge in interface BBlockpublic boolean isEntryBlock()
public boolean isEntryBBlock()
BBlock
isEntryBBlock in interface BBlockpublic boolean isExitBlock()
public boolean isExitBBlock()
BBlock
isExitBBlock in interface BBlockpublic java.util.List getDomForSubpFlow()
BBlockBBlocks that dominate this BBlock in the SubpFlow this BBlock belongs to.
getDomForSubpFlow in interface BBlockpublic void setDomForSubpFlow(java.util.List pDom)
BBlockBBlocks that dominate this BBlock in the SubpFlow this BBlock belongs to.
setDomForSubpFlow in interface BBlockpublic java.util.List getStrictDomForSubpFlow()
BBlockBBlock in the SubpFlow this BBlock belongs to. A strict dominator is the dominator list minus the BBlock itself.
getStrictDomForSubpFlow in interface BBlockpublic BBlock getImmediateDominatorForSubpFlow()
getImmediateDominatorForSubpFlow in interface BBlockpublic void setImmediateDominatorForSubpFlow(BBlock pDominator)
setImmediateDominatorForSubpFlow in interface BBlockpublic java.util.List getDominatedChildrenForSubpFlow()
getDominatedChildrenForSubpFlow in interface BBlockpublic void setDominatedChildrenForSubpFlow(java.util.List pDominatedChildren)
setDominatedChildrenForSubpFlow in interface BBlockpublic java.util.List getPostdomForSubpFlow()
getPostdomForSubpFlow in interface BBlockpublic void setPostdomForSubpFlow(java.util.List pPostdom)
setPostdomForSubpFlow in interface BBlockpublic java.util.List getStrictPostdomForSubpFlow()
getStrictPostdomForSubpFlow in interface BBlockpublic BBlock getImmediatePostdominatorForSubpFlow()
getImmediatePostdominatorForSubpFlow in interface BBlockpublic void setImmediatePostdominatorForSubpFlow(BBlock pPostDominator)
setImmediatePostdominatorForSubpFlow in interface BBlockpublic java.util.List getPostdominatedChildrenForSubpFlow()
BBlock
getPostdominatedChildrenForSubpFlow in interface BBlockpublic void setPostdominatedChildrenForSubpFlow(java.util.List pPostDominatedChildren)
setPostdominatedChildrenForSubpFlow in interface BBlockpublic BBlock getNextInDFO()
public void setNextInDFO(BBlock pNext)
public BBlock getNextInInverseDFO()
public void setNextInInveseDFO(BBlock pNext)
public java.lang.Object getWork()
BBlock
getWork in interface BBlockpublic void setWork(java.lang.Object pWork)
setWork in interface BBlockpublic java.lang.String toStringShort()
BBlock
toStringShort in interface BBlockpublic java.lang.String toStringDetail()
BBlock
toStringDetail in interface BBlockpublic void printSubtrees()
public BBlock insertLoopPreheader()
public BBlock insertConditionalInitPart()
throws CompileError
CompileError
public void changeSuccEdge(BBlock pBefore,
BBlock pAfter)
BBlock
changeSuccEdge in interface BBlock
public void changePredEdge(BBlock pBefore,
BBlock pAfter)
changePredEdge in interface BBlock
public void addEdge(Exp pConditionalExp,
BBlock pToBlock)
addEdge in interface BBlockpublic void deleteEdge(BBlock pToBlock)
deleteEdge in interface BBlockpublic void deleteBBlock()
deleteBBlock in interface BBlockpublic void addToPredList(BBlock pPred)
addToPredList in interface BBlockpublic void addToSuccList(BBlock pSucc)
addToSuccList in interface BBlockpublic void deleteFromPredList(BBlock pPred)
deleteFromPredList in interface BBlockpublic void deleteFromSuccList(BBlock pSucc)
deleteFromSuccList in interface BBlockpublic void deleteFromSuccList0(BBlock pSucc)
public void fuseSuccessor(BBlock pToBlock)
BBlockImpl)'s implementation changes only the predecessor/successor relations.
fuseSuccessor in interface BBlockpublic SubpFlow getSubpFlow()
BBlockSubpFlow object this BBlock belongs to.
getSubpFlow in interface BBlockpublic java.lang.String toString()
public java.lang.String toStringVeryShort()
public DefVector getDef()
public void setDef(DefVector pVect)
public DefVector getDDef()
public void setDDef(DefVector pVect)
public DefVector getPDef()
BBlock
getPDef in interface BBlockpublic void setPDef(DefVector pVect)
setPDef in interface BBlockpublic DefVector getDKill()
getDKill in interface BBlockpublic void setDKill(DefVector pVect)
setDKill in interface BBlockpublic DefVector getPKill()
getPKill in interface BBlockpublic void setPKill(DefVector pVect)
setPKill in interface BBlockpublic DefVector getReach()
public void setReach(DefVector pVect)
public DefVector getPReach()
getPReach in interface BBlockpublic void setPReach(DefVector pVect)
setPReach in interface BBlockpublic void setDReach(DefVector pVect)
public FlowAnalSymVector getDDefined()
getDDefined in interface BBlockpublic void setDDefined(FlowAnalSymVector pVect)
setDDefined in interface BBlockpublic FlowAnalSymVector getPDefined()
BBlockFlowAnalSyms whose value may have changed in this BBlock..
getPDefined in interface BBlockpublic void setPDefined(FlowAnalSymVector pVect)
setPDefined in interface BBlockpublic FlowAnalSymVector getPUsed()
getPUsed in interface BBlockpublic void setPUsed(FlowAnalSymVector pVect)
setPUsed in interface BBlockpublic FlowAnalSymVector getDExposed()
getDExposed in interface BBlockpublic void setDExposed(FlowAnalSymVector pVect)
setDExposed in interface BBlockpublic FlowAnalSymVector getPExposed()
getPExposed in interface BBlockpublic void setPExposed(FlowAnalSymVector pVect)
setPExposed in interface BBlockpublic ExpVector getDEGen()
getDEGen in interface BBlockpublic void setDEGen(ExpVector pVect)
setDEGen in interface BBlockpublic ExpVector getPEKill()
getPEKill in interface BBlockpublic void setPEKill(ExpVector pVect)
setPEKill in interface BBlockpublic ExpVector getDAvailIn()
getDAvailIn in interface BBlockpublic void setDAvailIn(ExpVector pVect)
setDAvailIn in interface BBlockpublic ExpVector getDAvailOut()
getDAvailOut in interface BBlockpublic void setDAvailOut(ExpVector pVect)
setDAvailOut in interface BBlockpublic FlowAnalSymVector getPLiveIn()
getPLiveIn in interface BBlockpublic void setPLiveIn(FlowAnalSymVector pVect)
setPLiveIn in interface BBlockpublic FlowAnalSymVector getPLiveOut()
getPLiveOut in interface BBlockpublic void setPLiveOut(FlowAnalSymVector pVect)
setPLiveOut in interface BBlockpublic FlowAnalSymVector getDDefIn()
getDDefIn in interface BBlockpublic void setDDefIn(FlowAnalSymVector pVect)
setDDefIn in interface BBlockpublic FlowAnalSymVector getDDefOut()
getDDefOut in interface BBlockpublic void setDDefOut(FlowAnalSymVector pVect)
setDDefOut in interface BBlockpublic boolean isDDef(SetRefRepr pSetRefRepr)
BBlock
isDDef in interface BBlockpublic boolean isPDef(SetRefRepr pSetRefRepr)
isPDef in interface BBlockpublic boolean isDKill(SetRefRepr pSetRefRepr)
BBlock
isDKill in interface BBlockpublic boolean isPKill(SetRefRepr pSetRefRepr)
isPKill in interface BBlockpublic boolean isPReach(SetRefRepr pSetRefRepr)
isPReach in interface BBlockpublic boolean isDDefined(Sym pSym)
BBlock
isDDefined in interface BBlockpublic boolean isPDefined(Sym pSym)
BBlock
isPDefined in interface BBlockpublic boolean isDUsed(Sym pSym)
BBlock
isDUsed in interface BBlockpublic boolean isPUsed(Sym pSym)
isPUsed in interface BBlockpublic boolean isDExposed(Sym pSym)
BBlock
isDExposed in interface BBlockpublic boolean isPExposed(Sym pSym)
isPExposed in interface BBlockpublic boolean isDEGen(FlowExpId pExpId)
BBlock
isDEGen in interface BBlockpublic boolean isPEKill(FlowExpId pExpId)
BBlock
isPEKill in interface BBlockpublic boolean isDAvailIn(FlowExpId pExpId)
BBlock
isDAvailIn in interface BBlockpublic boolean isDAvailOut(FlowExpId pExpId)
BBlock
isDAvailOut in interface BBlockpublic boolean isPLiveIn(Sym pSym)
BBlock
isPLiveIn in interface BBlockpublic boolean isPLiveOut(Sym pSym)
BBlock
isPLiveOut in interface BBlockpublic boolean isDDefIn(Sym pSym)
BBlock
isDDefIn in interface BBlockpublic boolean isDDefOut(Sym pSym)
BBlock
isDDefOut in interface BBlockpublic FlowAnalSymVector getDUsed()
BBlockSetRefReprs (specified by SetRefRepr#getUseSyms()).
getDUsed in interface BBlockpublic void setDUsed(FlowAnalSymVector pVect)
setDUsed in interface BBlock
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||