DataFlow Class Reference

#include <include/dataflow.h>

List of all members.


Detailed Description

Definition at line 44 of file dataflow.h.

Public Member Functions

int ancestorWithLowestSemi (int v)
bool canRename (Exp *e, UserProc *proc)
bool canRenameLocalsParams ()
void clearA_phi ()
void computeDF (int n)
void convertImplicits (Cfg *cfg)
 DataFlow ()
void DFS (int p, int n)
bool doesDominate (int n, int w)
void dominators (Cfg *cfg)
void dumpA_orig ()
void dumpA_phi ()
void dumpDefsites ()
void dumpStacks ()
void findLiveAtDomPhi (int n, LocationSet &usedByDomPhi, LocationSet &usedByDomPhi0, std::map< Exp *, PhiAssign *, lessExpStar > &defdByPhi)
std::set< int > & getA_phi (Exp *e)
std::set< int > & getDF (int node)
int getIdom (int node)
int getSemi (int node)
void Link (int p, int n)
PBB nodeToBB (int node)
int pbbToNode (PBB bb)
bool placePhiFunctions (UserProc *proc)
bool renameBlockVars (UserProc *proc, int n, bool clearStacks=false)
void setDominanceNums (int n, int &currNum)
void setRenameLocalsParams (bool b)

Private Attributes

std::vector< std::set< Exp *,
lessExpStar > > 
A_orig
std::map< Exp *, std::set<
int >, lessExpStar
A_phi
std::vector< int > ancestor
std::vector< PBBBBs
std::vector< int > best
std::vector< std::set< int > > bucket
std::set< int > defallsites
std::map< Exp *, std::set<
int >, lessExpStar
defsites
std::map< Exp *, Statement *,
lessExpStar
defStmts
std::vector< std::set< int > > DF
std::vector< int > dfnum
std::vector< int > idom
std::map< PBB, int > indices
int N
std::vector< int > parent
bool renameLocalsAndParams
std::vector< int > samedom
std::vector< int > semi
std::map< Exp *, std::stack<
Statement * >, lessExpStar
Stacks
std::vector< int > vertex


Constructor & Destructor Documentation

DataFlow::DataFlow  )  [inline]
 

Definition at line 94 of file dataflow.h.


Member Function Documentation

int DataFlow::ancestorWithLowestSemi int  v  ) 
 

Definition at line 135 of file dataflow.cpp.

References ancestor, best, dfnum, and semi.

bool DataFlow::canRename Exp e,
UserProc proc
 

Definition at line 194 of file dataflow.cpp.

References Exp::getSubExp1(), UserProc::isAddressEscapedVar(), Exp::isFlags(), Exp::isLocal(), UserProc::isLocalOrParamPattern(), Exp::isMainFlag(), Exp::isMemOf(), Exp::isRegOf(), Exp::isSubscript(), Exp::isTemp(), and renameLocalsAndParams.

Referenced by UserProc::canRename(), and placePhiFunctions().

bool DataFlow::canRenameLocalsParams  )  [inline]
 

Definition at line 109 of file dataflow.h.

References renameLocalsAndParams.

void DataFlow::clearA_phi  )  [inline]
 

Definition at line 118 of file dataflow.h.

References A_phi.

void DataFlow::computeDF int  n  ) 
 

Definition at line 160 of file dataflow.cpp.

References BBs, BasicBlock::getOutEdges(), idom, and indices.

void DataFlow::convertImplicits Cfg cfg  ) 
 

Definition at line 740 of file dataflow.cpp.

References A_phi.

void DataFlow::DFS int  p,
int  n
 

Definition at line 38 of file dataflow.cpp.

References BBs, dfnum, BasicBlock::getOutEdges(), indices, N, parent, and vertex.

bool DataFlow::doesDominate int  n,
int  w
 

Definition at line 151 of file dataflow.cpp.

References idom.

void DataFlow::dominators Cfg cfg  ) 
 

Definition at line 53 of file dataflow.cpp.

References ancestor, BBs, Cfg::begin(), best, bucket, DF, dfnum, Cfg::end(), Cfg::getEntryBB(), Cfg::getNumBBs(), idom, indices, N, parent, samedom, semi, and vertex.

Referenced by UserProc::initialiseDecompile(), StatementTest::testBypass(), CfgTest::testDominators(), CfgTest::testPlacePhi(), CfgTest::testPlacePhi2(), CfgTest::testRenameVars(), and CfgTest::testSemiDominators().

void DataFlow::dumpA_orig  ) 
 

Definition at line 581 of file dataflow.cpp.

References A_orig.

void DataFlow::dumpA_phi  ) 
 

Definition at line 215 of file dataflow.cpp.

References A_phi.

void DataFlow::dumpDefsites  ) 
 

Definition at line 569 of file dataflow.cpp.

References defsites.

void DataFlow::dumpStacks  ) 
 

Definition at line 556 of file dataflow.cpp.

References Stacks.

void DataFlow::findLiveAtDomPhi int  n,
LocationSet usedByDomPhi,
LocationSet usedByDomPhi0,
std::map< Exp *, PhiAssign *, lessExpStar > &  defdByPhi
 

Definition at line 791 of file dataflow.cpp.

References BBs, BasicBlock::getFirstStmt(), BasicBlock::getNextStmt(), LocationSet::insert(), and Statement::isPhi().

Referenced by UserProc::findLiveAtDomPhi().

std::set<int>& DataFlow::getA_phi Exp e  )  [inline]
 

Definition at line 126 of file dataflow.h.

References A_phi.

Referenced by CfgTest::testPlacePhi(), and CfgTest::testPlacePhi2().

std::set<int>& DataFlow::getDF int  node  )  [inline]
 

Definition at line 122 of file dataflow.h.

References DF.

int DataFlow::getIdom int  node  )  [inline]
 

Definition at line 124 of file dataflow.h.

References idom.

int DataFlow::getSemi int  node  )  [inline]
 

Definition at line 125 of file dataflow.h.

References semi.

void DataFlow::Link int  p,
int  n
 

Definition at line 146 of file dataflow.cpp.

References ancestor, and best.

PBB DataFlow::nodeToBB int  node  )  [inline]
 

Definition at line 123 of file dataflow.h.

References BBs.

int DataFlow::pbbToNode PBB  bb  )  [inline]
 

Definition at line 121 of file dataflow.h.

References indices.

bool DataFlow::placePhiFunctions UserProc proc  ) 
 

Definition at line 230 of file dataflow.cpp.

References A_orig, ancestor, BBs, best, bucket, canRename(), defallsites, defsites, defStmts, dfnum, UserProc::getCFG(), BasicBlock::getFirstStmt(), BasicBlock::getNextStmt(), Cfg::getNumBBs(), indices, parent, samedom, semi, and vertex.

Referenced by UserProc::earlyDecompile(), UserProc::middleDecompile(), UserProc::placePhiFunctions(), UserProc::remUnusedStmtEtc(), CfgTest::testPlacePhi(), CfgTest::testPlacePhi2(), and CfgTest::testRenameVars().

bool DataFlow::renameBlockVars UserProc proc,
int  n,
bool  clearStacks = false
 

Definition at line 345 of file dataflow.cpp.

References Exp::addUsedLocs(), BBs, Exp::clone(), BasicBlock::getFirstStmt(), BasicBlock::getNextStmt(), Exp::getSubExp1(), Exp::isMemOf(), Statement::isPhi(), Exp::isRegOf(), and Stacks.

Referenced by UserProc::doRenameBlockVars(), StatementTest::testBypass(), and CfgTest::testRenameVars().

void DataFlow::setDominanceNums int  n,
int &  currNum
 

void DataFlow::setRenameLocalsParams bool  b  )  [inline]
 

Definition at line 108 of file dataflow.h.

References renameLocalsAndParams.


Member Data Documentation

std::vector<std::set<Exp*, lessExpStar> > DataFlow::A_orig [private]
 

Definition at line 71 of file dataflow.h.

Referenced by dumpA_orig(), and placePhiFunctions().

std::map<Exp*, std::set<int>, lessExpStar> DataFlow::A_phi [private]
 

Definition at line 77 of file dataflow.h.

Referenced by clearA_phi(), convertImplicits(), dumpA_phi(), and getA_phi().

std::vector<int> DataFlow::ancestor [private]
 

Definition at line 57 of file dataflow.h.

Referenced by ancestorWithLowestSemi(), dominators(), Link(), and placePhiFunctions().

std::vector<PBB> DataFlow::BBs [private]
 

Definition at line 48 of file dataflow.h.

Referenced by computeDF(), DFS(), dominators(), findLiveAtDomPhi(), nodeToBB(), placePhiFunctions(), and renameBlockVars().

std::vector<int> DataFlow::best [private]
 

Definition at line 62 of file dataflow.h.

Referenced by ancestorWithLowestSemi(), dominators(), Link(), and placePhiFunctions().

std::vector<std::set<int> > DataFlow::bucket [private]
 

Definition at line 63 of file dataflow.h.

Referenced by dominators(), and placePhiFunctions().

std::set<int> DataFlow::defallsites [private]
 

Definition at line 75 of file dataflow.h.

Referenced by placePhiFunctions().

std::map<Exp*, std::set<int>, lessExpStar > DataFlow::defsites [private]
 

Definition at line 73 of file dataflow.h.

Referenced by dumpDefsites(), and placePhiFunctions().

std::map<Exp*, Statement*, lessExpStar> DataFlow::defStmts [private]
 

Definition at line 79 of file dataflow.h.

Referenced by placePhiFunctions().

std::vector<std::set<int> > DataFlow::DF [private]
 

Definition at line 65 of file dataflow.h.

Referenced by dominators(), and getDF().

std::vector<int> DataFlow::dfnum [private]
 

Definition at line 55 of file dataflow.h.

Referenced by ancestorWithLowestSemi(), DFS(), dominators(), and placePhiFunctions().

std::vector<int> DataFlow::idom [private]
 

Definition at line 58 of file dataflow.h.

Referenced by computeDF(), doesDominate(), dominators(), and getIdom().

std::map<PBB, int> DataFlow::indices [private]
 

Definition at line 49 of file dataflow.h.

Referenced by computeDF(), DFS(), dominators(), pbbToNode(), and placePhiFunctions().

int DataFlow::N [private]
 

Definition at line 64 of file dataflow.h.

Referenced by DFS(), and dominators().

std::vector<int> DataFlow::parent [private]
 

Definition at line 61 of file dataflow.h.

Referenced by DFS(), dominators(), and placePhiFunctions().

bool DataFlow::renameLocalsAndParams [private]
 

Definition at line 91 of file dataflow.h.

Referenced by canRename(), canRenameLocalsParams(), and setRenameLocalsParams().

std::vector<int> DataFlow::samedom [private]
 

Definition at line 59 of file dataflow.h.

Referenced by dominators(), and placePhiFunctions().

std::vector<int> DataFlow::semi [private]
 

Definition at line 56 of file dataflow.h.

Referenced by ancestorWithLowestSemi(), dominators(), getSemi(), and placePhiFunctions().

std::map<Exp*, std::stack<Statement*>, lessExpStar> DataFlow::Stacks [private]
 

Definition at line 86 of file dataflow.h.

Referenced by dumpStacks(), and renameBlockVars().

std::vector<int> DataFlow::vertex [private]
 

Definition at line 60 of file dataflow.h.

Referenced by DFS(), dominators(), and placePhiFunctions().


The documentation for this class was generated from the following files:
Generated on Tue Sep 19 21:18:41 2006 for Boomerang by  doxygen 1.4.6