Skip to content

Commit e3be025

Browse files
committed
SVFG: refactor fromValue to use SVFIR
1 parent 67fbf56 commit e3be025

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/Graphs/SVFG.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -577,22 +577,22 @@ void SVFG::dump(const std::string& file, bool simple)
577577

578578
std::set<const SVFGNode*> SVFG::fromValue(const llvm::Value* value) const
579579
{
580-
SVFIR* pag = SVFIR::getPAG();
580+
SVFIR* svfir = SVFIR::getPAG();
581581
std::set<const SVFGNode*> ret;
582-
// search for all PAGEdges first
583-
for (const PAGEdge* pagEdge : pag->getValueEdges(value))
582+
// search for all SVFStmts first
583+
for (const SVFStmt* svfStmt : svfir->getValueEdges(value))
584584
{
585-
PAGEdgeToStmtVFGNodeMapTy::const_iterator it = PAGEdgeToStmtVFGNodeMap.find(pagEdge);
585+
PAGEdgeToStmtVFGNodeMapTy::const_iterator it = PAGEdgeToStmtVFGNodeMap.find(svfStmt);
586586
if (it != PAGEdgeToStmtVFGNodeMap.end())
587587
{
588588
ret.emplace(it->second);
589589
}
590590
}
591-
// add all PAGNodes
592-
PAGNode* pagNode = pag->getGNode(pag->getValueNode(value));
593-
if(hasDef(pagNode))
591+
// add all SVFVars
592+
SVFVar* svfVar = svfir->getGNode(svfir->getValueNode(value));
593+
if(hasDef(svfVar))
594594
{
595-
ret.emplace(getDefSVFGNode(pagNode));
595+
ret.emplace(getDefSVFGNode(svfVar));
596596
}
597597
return ret;
598598
}

0 commit comments

Comments
 (0)