ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cfgUtils Namespace Reference

Functions

void initCFGUtils (SgProject *project_arg)
 
SgProjectgetProject ()
 
bool computeTermsOfIfCondition_LTEQ (SgExpression *expr, varID &x, bool &negX, varID &y, bool &negY, long &c)
 
bool computeTermsOfIfCondition_EQ (SgExpression *expr, varID &x, bool &negX, varID &y, bool &negY, long &c)
 
bool findArrayAccesses (SgNode *ast_node, m_varID2varID2quad &wrIndex, m_varID2varID2quad &rdIndex, m_varID2bool &rdFromExp, m_varID2bool &wrFromExp, varIDSet arrays, m_varID2str vars2Name)
 
bool parseArrayAccess (SgNode *ast_node, m_varID2varID2quad &wrIndexSimp, varIDlist &wrIndexCpx, m_varID2varID2quad &rdIndexSimp, varIDlist &rdIndexCpx, m_varID2str vars2Name)
 
bool isAssignment (SgNode *n)
 
SgNodegetAssignmentLHS (SgNode *n)
 
void getAssignmentRHS (SgNode *n, std::set< SgNode * > &rhs)
 
bool parseAssignment (SgNode *expr, short &op, varID &i, varID &j, bool &negJ, varID &k, bool &negK, long &c)
 
bool parseExpr (const SgExpression *expr, short &op, varID &i, bool &negI, varID &j, bool &negJ, long &c)
 
bool parseAddition (const SgExpression *expr, varID &j, bool &negJ, varID &k, bool &negK, long &c)
 
bool parseMultiplication (const SgExpression *expr, varID &j, varID &k, long &c)
 
bool parseDivision (const SgExpression *expr, varID &j, varID &k, long &c)
 
bool IsConstInt (const SgExpression *rhs, long &val)
 
const SgExpressionunwrapCasts (const SgExpression *e)
 
DataflowNode getFuncStartCFG (SgFunctionDefinition *func, bool(*f)(CFGNode)=defaultFilter)
 
DataflowNode getFuncEndCFG (SgFunctionDefinition *func, bool(*f)(CFGNode)=defaultFilter)
 
std::string genUniqueName ()
 
SgFunctionDeclarationgetFuncDecl (std::string name)
 
SgFunctionDefinitionfuncDeclToDef (SgFunctionDeclaration *decl)
 

Variables

SgProjectproject
 
const short none =0
 
const short add =1
 
const short subtract =2
 
const short mult =3
 
const short divide =4
 

Function Documentation

void cfgUtils::initCFGUtils ( SgProject project_arg)
SgProject* cfgUtils::getProject ( )
bool cfgUtils::computeTermsOfIfCondition_LTEQ ( SgExpression expr,
varID x,
bool &  negX,
varID y,
bool &  negY,
long &  c 
)
bool cfgUtils::computeTermsOfIfCondition_EQ ( SgExpression expr,
varID x,
bool &  negX,
varID y,
bool &  negY,
long &  c 
)
bool cfgUtils::findArrayAccesses ( SgNode ast_node,
m_varID2varID2quad wrIndex,
m_varID2varID2quad rdIndex,
m_varID2bool rdFromExp,
m_varID2bool wrFromExp,
varIDSet  arrays,
m_varID2str  vars2Name 
)
bool cfgUtils::parseArrayAccess ( SgNode ast_node,
m_varID2varID2quad wrIndexSimp,
varIDlist wrIndexCpx,
m_varID2varID2quad rdIndexSimp,
varIDlist rdIndexCpx,
m_varID2str  vars2Name 
)
bool cfgUtils::isAssignment ( SgNode n)
SgNode* cfgUtils::getAssignmentLHS ( SgNode n)
void cfgUtils::getAssignmentRHS ( SgNode n,
std::set< SgNode * > &  rhs 
)
bool cfgUtils::parseAssignment ( SgNode expr,
short &  op,
varID i,
varID j,
bool &  negJ,
varID k,
bool &  negK,
long &  c 
)
bool cfgUtils::parseExpr ( const SgExpression expr,
short &  op,
varID i,
bool &  negI,
varID j,
bool &  negJ,
long &  c 
)
bool cfgUtils::parseAddition ( const SgExpression expr,
varID j,
bool &  negJ,
varID k,
bool &  negK,
long &  c 
)
bool cfgUtils::parseMultiplication ( const SgExpression expr,
varID j,
varID k,
long &  c 
)
bool cfgUtils::parseDivision ( const SgExpression expr,
varID j,
varID k,
long &  c 
)
bool cfgUtils::IsConstInt ( const SgExpression rhs,
long &  val 
)
const SgExpression* cfgUtils::unwrapCasts ( const SgExpression e)
DataflowNode cfgUtils::getFuncStartCFG ( SgFunctionDefinition func,
bool(*)(CFGNode f = defaultFilter 
)
DataflowNode cfgUtils::getFuncEndCFG ( SgFunctionDefinition func,
bool(*)(CFGNode f = defaultFilter 
)
std::string cfgUtils::genUniqueName ( )
SgFunctionDeclaration* cfgUtils::getFuncDecl ( std::string  name)
SgFunctionDefinition* cfgUtils::funcDeclToDef ( SgFunctionDeclaration decl)

Variable Documentation

SgProject* cfgUtils::project
const short cfgUtils::none =0

Definition at line 81 of file cfgUtils.h.

const short cfgUtils::add =1
const short cfgUtils::subtract =2

Definition at line 83 of file cfgUtils.h.

const short cfgUtils::mult =3

Definition at line 84 of file cfgUtils.h.

const short cfgUtils::divide =4

Definition at line 85 of file cfgUtils.h.