#include <include/cfg.h>
Definition at line 74 of file cfg.h.
Public Types | |
typedef BB_IT | iterator |
Public Member Functions | |
void | addCall (CallStatement *call) |
void | addJunctionStatements () |
void | addNewOutEdge (PBB fromBB, PBB newOutEdge) |
void | addOutEdge (PBB pBB, PBB pDestBB, bool bSetLabel=false) |
void | addOutEdge (PBB pBB, ADDRESS adr, bool bSetLabel=false) |
void | appendBBs (std::list< PBB > &worklist, std::set< PBB > &workset) |
PBB | bbForAddr (ADDRESS addr) |
iterator | begin () |
Cfg () | |
void | checkConds () |
void | clear () |
PBB | commonPDom (PBB curImmPDom, PBB succImmPDom) |
bool | compressCfg () |
bool | decodeIndirectJmp (UserProc *proc) |
void | determineLoopType (PBB header, bool *&loopNodes) |
void | dump () |
void | dumpImplicitMap () |
iterator | end () |
bool | establishDFTOrder () |
bool | establishRevDFTOrder () |
bool | existsBB (ADDRESS uNativeAddr) |
void | findImmedPDom () |
Statement * | findImplicitAssign (Exp *x) |
Statement * | findImplicitParamAssign (Parameter *p) |
void | findInterferences (ConnectionGraph &ig) |
void | findLoopFollow (PBB header, bool *&loopNodes) |
PBB | findRetNode () |
Statement * | findTheImplicitAssign (Exp *x) |
void | generateDotFile (std::ofstream &of) |
std::set< CallStatement * > & | getCalls () |
PBB | getEntryBB () |
PBB | getExitBB () |
PBB | getFirstBB (BB_IT &it) |
PBB | getNextBB (BB_IT &it) |
unsigned | getNumBBs () |
Exp * | getReturnVal () |
bool | implicitsDone () |
bool | isIncomplete (ADDRESS uNativeAddr) |
bool | isOrphan (ADDRESS uAddr) |
bool | isWellFormed () |
bool | joinBB (PBB pb1, PBB pb2) |
bool | label (ADDRESS uNativeAddr, PBB &pNewBB) |
bool | mergeBBs (PBB pb1, PBB pb2) |
PBB | newBB (std::list< RTL * > *pRtls, BBTYPE bbType, int iNumOutEdges) throw (BBAlreadyExistsError) |
PBB | newIncompleteBB (ADDRESS addr) |
const Cfg & | operator= (const Cfg &other) |
int | pbbToIndex (PBB pBB) |
void | print (std::ostream &out, bool html=false) |
void | printToLog () |
void | removeBB (PBB bb) |
void | removeImplicitAssign (Exp *x) |
void | removeIncBB (ADDRESS uAddr) |
void | removeJunctionStatements () |
void | removeUnneededLabels (HLLCode *hll) |
void | removeUsedGlobals (std::set< Global * > &unusedGlobals) |
void | resetDFASets () |
void | resolveGotos () |
bool | searchAll (Exp *search, std::list< Exp * > &result) |
void | searchAndReplace (Exp *search, Exp *replace) |
void | setEntryBB (PBB bb) |
void | setExitBB (PBB bb) |
void | setImplicitsDone () |
void | setLabel (PBB pBB) |
void | setProc (UserProc *proc) |
void | setReturnVal (Exp *e) |
void | setTimeStamps () |
void | simplify () |
void | sortByAddress () |
void | sortByFirstDFT () |
void | sortByLastDFT () |
PBB | splitForBranch (PBB pBB, RTL *rtl, BranchStatement *br1, BranchStatement *br2, BB_IT &it) |
void | structConds () |
void | structLoops () |
void | structure () |
void | tagNodesInLoop (PBB header, bool *&loopNodes) |
void | undoComputedBB (Statement *stmt) |
void | unTraverse () |
void | updateVectorBB () |
void | virtualFunctionCalls (Prog *prog) |
bool | wellFormCfg () |
~Cfg () | |
Public Attributes | |
std::vector< PBB > | m_vectorBB |
Protected Member Functions | |
void | addBB (PBB bb) |
Private Member Functions | |
bool | checkEntryBB () |
void | completeMerge (PBB pb1, PBB pb2, bool bDelete) |
PBB | splitBB (PBB pBB, ADDRESS uNativeAddr, PBB pNewBB=0, bool bDelRtls=false) |
Private Attributes | |
bool | bImplicitsDone |
std::set< CallStatement * > | callSites |
BasicBlock * | entryBB |
BasicBlock * | exitBB |
std::map< Exp *, Statement *, lessExpStar > | implicitMap |
int | lastLabel |
bool | m_bWellFormed |
std::list< PBB > | m_listBB |
MAPBB | m_mapBB |
UserProc * | myProc |
std::vector< PBB > | Ordering |
std::vector< PBB > | revOrdering |
bool | structured |
Friends | |
class | XMLProgParser |
Classes | |
class | BBAlreadyExistsError |
|
|
|
|
|
Definition at line 74 of file cfg.cpp. References m_listBB. |
|
Definition at line 509 of file cfg.h. References m_listBB. |
|
Definition at line 1065 of file cfg.cpp. References callSites. |
|
Definition at line 1625 of file cfg.cpp. References m_listBB, and NULL. Referenced by UserProc::rangeAnalysis(). |
|
Definition at line 1166 of file cfg.cpp. References BasicBlock::m_bJumpReqd, BasicBlock::m_iNumOutEdges, BasicBlock::m_OutEdges, and setLabel(). |
|
Definition at line 316 of file cfg.cpp. References BasicBlock::m_InEdges, BasicBlock::m_iNumInEdges, BasicBlock::m_OutEdges, and setLabel(). |
|
Definition at line 338 of file cfg.cpp. References m_mapBB. Referenced by SparcFrontEnd::case_SCD(), case_SCD_NCT(), SparcFrontEnd::case_SCDAN(), case_SCDAN_NCT(), and FrontEnd::createReturnBlock(). |
|
Definition at line 1808 of file cfg.cpp. References m_listBB. Referenced by findInterferences(). |
|
Definition at line 400 of file cfg.h. References m_mapBB. |
|
Definition at line 223 of file cfg.h. References m_listBB. Referenced by UserProc::clearUses(), UserProc::doesParamChainToCall(), DataFlow::dominators(), UserProc::eliminateDuplicateArgs(), UserProc::ellipsisProcessing(), UserProc::insertStatementAfter(), PentiumFrontEnd::processStringInst(), UserProc::removeCallLiveness(), and UserProc::updateArguments(). |
|
Definition at line 1520 of file cfg.cpp. References BELSE, BTHEN, Case, Cond, IfElse, IfThen, JumpInOutLoop, LoopCond, Ordering, and Structured. Referenced by structure(). |
|
Definition at line 160 of file cfg.cpp. References entryBB, Proc::getName(), myProc, and NULL. Referenced by establishDFTOrder(). |
|
Definition at line 101 of file cfg.cpp. References callSites, entryBB, exitBB, implicitMap, lastLabel, m_bWellFormed, m_listBB, m_mapBB, and NULL. Referenced by UserProc::unDecode(). |
|
Definition at line 1228 of file cfg.cpp. References BasicBlock::getLowAddr(), GIVEUP, BasicBlock::immPDom, LOG, BasicBlock::revOrd, and VERBOSE. Referenced by findImmedPDom(). |
|
Definition at line 778 of file cfg.cpp. References BasicBlock::m_InEdges, and BasicBlock::m_iNumInEdges. Referenced by mergeBBs(). |
|
Definition at line 851 of file cfg.cpp. References BasicBlock::m_bJumpReqd, m_bWellFormed, m_listBB, and setLabel(). |
|
Definition at line 2014 of file cfg.cpp. References m_listBB. |
|
Definition at line 1335 of file cfg.cpp. References BasicBlock::getLatchNode(), BasicBlock::getType(), LoopCond, PostTested, BasicBlock::setLoopType(), BasicBlock::setStructType(), and TWOWAY. |
|
Definition at line 1190 of file cfg.cpp. References print(). |
|
Definition at line 1194 of file cfg.cpp. References implicitMap. |
|
Definition at line 224 of file cfg.h. References m_listBB. Referenced by UserProc::clearUses(), UserProc::doesParamChainToCall(), DataFlow::dominators(), UserProc::eliminateDuplicateArgs(), UserProc::ellipsisProcessing(), UserProc::insertStatementAfter(), PentiumFrontEnd::processStringInst(), UserProc::removeCallLiveness(), and UserProc::updateArguments(). |
|
Definition at line 943 of file cfg.cpp. References checkEntryBB(), BasicBlock::DFTOrder(), entryBB, m_bWellFormed, m_listBB, and unTraverse(). Referenced by UserProc::rangeAnalysis(). |
|
Definition at line 986 of file cfg.cpp. References findRetNode(), m_bWellFormed, m_listBB, NULL, BasicBlock::RevDFTOrder(), and unTraverse(). |
|
Definition at line 362 of file cfg.cpp. References m_mapBB. Referenced by TargetQueue::nextAddress(). |
|
Definition at line 1262 of file cfg.cpp. References commonPDom(), BasicBlock::getOutEdges(), BasicBlock::immPDom, BasicBlock::revOrd, and revOrdering. Referenced by structure(). |
|
Definition at line 2031 of file cfg.cpp. References Exp::clone(), entryBB, implicitMap, myProc, and BasicBlock::prependStmt(). Referenced by ImplicitConverter::postVisit(), and StmtImplicitConverter::visit(). |
|
Definition at line 2058 of file cfg.cpp. References Parameter::getExp(), Parameter::getName(), implicitMap, and Location::param(). Referenced by Signature::dfaTypeAnalysis(). |
|
Definition at line 1767 of file cfg.cpp. References appendBBs(), BasicBlock::calcLiveness(), count, DEBUG_LIVENESS, LOG, m_listBB, BasicBlock::m_pRtls, myProc, NULL, and updateWorkListRev(). |
|
Definition at line 1368 of file cfg.cpp. References Cond, BasicBlock::getCondFollow(), BasicBlock::getLatchNode(), BasicBlock::getLoopHead(), BasicBlock::getLoopType(), BasicBlock::getOutEdges(), BasicBlock::getStructType(), Loop, LoopCond, NULL, BasicBlock::ord, Ordering, PostTested, PreTested, and BasicBlock::setLoopFollow(). |
|
Definition at line 962 of file cfg.cpp. References m_listBB, NULL, and RET. Referenced by FrontEnd::createReturnBlock(), establishRevDFTOrder(), setTimeStamps(), and structure(). |
|
Definition at line 2050 of file cfg.cpp. References implicitMap, and NULL. Referenced by UserProc::lookupParam(). |
|
Definition at line 1656 of file cfg.cpp. References m_listBB, NO_ADDRESS, ONEWAY, and TWOWAY. Referenced by Prog::generateDotFile(). |
|
Definition at line 1076 of file cfg.cpp. References callSites. |
|
Definition at line 462 of file cfg.h. References entryBB. Referenced by DataFlow::dominators(), UserProc::getEntryBB(), UserProc::insertAssignAfter(), and UserProc::rangeAnalysis(). |
|
Definition at line 463 of file cfg.h. References exitBB. Referenced by UserProc::initStatements(), and UserProc::isNoReturn(). |
|
|
|
Definition at line 151 of file cfg.h. References m_listBB. Referenced by DataFlow::dominators(), UserProc::fromSSAform(), and DataFlow::placePhiFunctions(). |
|
|
|
Definition at line 498 of file cfg.h. References bImplicitsDone. Referenced by CallStatement::makeArgAssign(). |
|
Definition at line 596 of file cfg.cpp. References BasicBlock::m_bIncomplete, and m_mapBB. Referenced by TargetQueue::nextAddress(). |
|
Definition at line 1029 of file cfg.cpp. References BasicBlock::m_bIncomplete, m_mapBB, and BasicBlock::m_pRtls. |
|
Definition at line 1018 of file cfg.cpp. References m_bWellFormed. |
|
Definition at line 818 of file cfg.cpp. References BasicBlock::getOutEdges(), and BasicBlock::m_pRtls. |
|
Definition at line 512 of file cfg.cpp. References BasicBlock::getHiAddr(), BasicBlock::getLowAddr(), BasicBlock::m_bIncomplete, m_mapBB, and NULL. Referenced by TargetQueue::visit(). |
|
Definition at line 755 of file cfg.cpp. References completeMerge(), m_bWellFormed, BasicBlock::m_InEdges, BasicBlock::m_iNumInEdges, BasicBlock::m_iNumOutEdges, and BasicBlock::m_OutEdges. |
|
|
|
|
Definition at line 122 of file cfg.cpp. References m_bWellFormed, m_listBB, and m_mapBB. |
|
Definition at line 1049 of file cfg.cpp. References m_listBB. |
|
Definition at line 1184 of file cfg.cpp. References m_listBB. Referenced by case_CALL_NCT(), dump(), UserProc::print(), printToLog(), StatementTest::testEmpty(), StatementTest::testEndlessLoop(), StatementTest::testFlow(), StatementTest::testKill(), StatementTest::testRecursion(), StatementTest::testUse(), StatementTest::testUseKill(), StatementTest::testUseOverBB(), and StatementTest::testUseOverKill(). |
|
|
|
Definition at line 838 of file cfg.cpp. References m_listBB. Referenced by UserProc::branchAnalysis(). |
|
Definition at line 2070 of file cfg.cpp. References implicitMap, myProc, and UserProc::removeStatement(). Referenced by UserProc::removeRedundantParameters(). |
|
|
|
Definition at line 1639 of file cfg.cpp. References m_listBB. |
|
Definition at line 1650 of file cfg.cpp. References Ordering, and HLLCode::RemoveUnusedLabels(). |
|
|
|
|
|
|
|
Definition at line 1098 of file cfg.cpp. References m_listBB. Referenced by UserProc::searchAll(). |
|
Definition at line 1088 of file cfg.cpp. References m_listBB. Referenced by UserProc::renameLocal(). |
|
Definition at line 137 of file cfg.cpp. References entryBB, exitBB, m_listBB, and RET. Referenced by StatementTest::testEmpty(), StatementTest::testEndlessLoop(), StatementTest::testFlow(), StatementTest::testKill(), StatementTest::testRecursion(), StatementTest::testUse(), StatementTest::testUseKill(), StatementTest::testUseOverBB(), and StatementTest::testUseOverKill(). |
|
Definition at line 149 of file cfg.cpp. References exitBB. |
|
Definition at line 500 of file cfg.h. References bImplicitsDone. |
|
Definition at line 1150 of file cfg.cpp. References lastLabel, and BasicBlock::m_iLabelNum. Referenced by addNewOutEdge(), addOutEdge(), and compressCfg(). |
|
Definition at line 90 of file cfg.cpp. References myProc. Referenced by UserProc::UserProc(). |
|
|
|
Definition at line 1207 of file cfg.cpp. References DFS_TAG, entryBB, findRetNode(), m_listBB, Ordering, revOrdering, BasicBlock::setLoopStamps(), BasicBlock::setRevLoopStamps(), and BasicBlock::setRevOrder(). Referenced by structure(). |
|
Definition at line 1176 of file cfg.cpp. References LOG, m_listBB, and VERBOSE. Referenced by UserProc::simplify(). |
|
Definition at line 615 of file cfg.cpp. References BasicBlock::lessAddress(), and m_listBB. Referenced by UserProc::initialiseDecompile(), UserProc::rangeAnalysis(), and StatementTest::testBypass(). |
|
Definition at line 626 of file cfg.cpp. References BasicBlock::lessFirstDFT(), m_listBB, m_vectorBB, and updateVectorBB(). |
|
Definition at line 646 of file cfg.cpp. References BasicBlock::lessLastDFT(), m_listBB, m_vectorBB, and updateVectorBB(). |
|
Definition at line 383 of file cfg.cpp. References BasicBlock::m_pRtls. |
|
Definition at line 1855 of file cfg.cpp. References BasicBlock::m_pRtls, and BasicBlock::prints(). Referenced by toBranches(). |
|
Definition at line 1307 of file cfg.cpp. References Cond, Ordering, and TWOWAY. Referenced by structure(). |
|
Definition at line 1456 of file cfg.cpp. References NULL, BasicBlock::ord, and Ordering. Referenced by structure(). |
|
Definition at line 1608 of file cfg.cpp. References checkConds(), findImmedPDom(), findRetNode(), Boomerang::get(), NULL, setTimeStamps(), structConds(), structLoops(), structured, and unTraverse(). Referenced by UserProc::generateCode(). |
|
Definition at line 1432 of file cfg.cpp. References BasicBlock::getLatchNode(), BasicBlock::ord, and Ordering. |
|
Definition at line 2023 of file cfg.cpp. References m_listBB. Referenced by UserProc::undoComputedBB(). |
|
Definition at line 923 of file cfg.cpp. References m_listBB, and UNTRAVERSED. Referenced by establishDFTOrder(), establishRevDFTOrder(), PentiumFrontEnd::processProc(), and structure(). |
|
Definition at line 666 of file cfg.cpp. References m_listBB, and m_vectorBB. Referenced by sortByFirstDFT(), and sortByLastDFT(). |
|
|
|
Definition at line 681 of file cfg.cpp. References addr(), BasicBlock::getLowAddr(), m_bWellFormed, BasicBlock::m_InEdges, m_listBB, m_mapBB, BasicBlock::m_OutEdges, and NULL. |
|
|
|
Definition at line 124 of file cfg.h. Referenced by implicitsDone(), and setImplicitsDone(). |
|
Definition at line 110 of file cfg.h. Referenced by addCall(), clear(), and getCalls(). |
|
Definition at line 99 of file cfg.h. Referenced by checkEntryBB(), clear(), establishDFTOrder(), findImplicitAssign(), getEntryBB(), XMLProgParser::persistToXML(), setEntryBB(), and setTimeStamps(). |
|
Definition at line 100 of file cfg.h. Referenced by clear(), getExitBB(), XMLProgParser::persistToXML(), setEntryBB(), and setExitBB(). |
|
Definition at line 122 of file cfg.h. Referenced by clear(), dumpImplicitMap(), findImplicitAssign(), findImplicitParamAssign(), findTheImplicitAssign(), and removeImplicitAssign(). |
|
Definition at line 115 of file cfg.h. Referenced by clear(), XMLProgParser::persistToXML(), and setLabel(). |
|
Definition at line 105 of file cfg.h. Referenced by clear(), compressCfg(), establishDFTOrder(), establishRevDFTOrder(), isWellFormed(), mergeBBs(), operator=(), XMLProgParser::persistToXML(), and wellFormCfg(). |
|
|
Definition at line 94 of file cfg.h. Referenced by addOutEdge(), bbForAddr(), clear(), existsBB(), isIncomplete(), isOrphan(), label(), newIncompleteBB(), operator=(), and wellFormCfg(). |
|
Definition at line 397 of file cfg.h. Referenced by sortByFirstDFT(), sortByLastDFT(), and updateVectorBB(). |
|
Definition at line 78 of file cfg.h. Referenced by checkEntryBB(), findImplicitAssign(), findInterferences(), removeImplicitAssign(), and setProc(). |
|
Definition at line 88 of file cfg.h. Referenced by checkConds(), findLoopFollow(), XMLProgParser::persistToXML(), removeUnneededLabels(), setTimeStamps(), structConds(), structLoops(), and tagNodesInLoop(). |
|
Definition at line 89 of file cfg.h. Referenced by findImmedPDom(), XMLProgParser::persistToXML(), and setTimeStamps(). |
|
Definition at line 105 of file cfg.h. Referenced by structure(). |