Skip to content

Commit

Permalink
Remove SVFG::fromValue.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarbar committed May 9, 2022
1 parent 71ba6bd commit cfb6657
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
5 changes: 0 additions & 5 deletions include/Graphs/SVFG.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,6 @@ class SVFG : public VFG
return getSVFGNode(getDef(pagNode));
}

/// Return the corresponding SVFGNodes to a given llvm::Value.
/// return an empty list, if the no mapping is possible
std::set<const SVFGNode*> fromValue(const llvm::Value* value) const;


/// Perform statistics
void performStat();

Expand Down
22 changes: 0 additions & 22 deletions lib/Graphs/SVFG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,28 +571,6 @@ void SVFG::dump(const std::string& file, bool simple)
GraphPrinter::WriteGraphToFile(outs(), file, this, simple);
}

std::set<const SVFGNode*> SVFG::fromValue(const llvm::Value* value) const
{
SVFIR* pag = SVFIR::getPAG();
std::set<const SVFGNode*> ret;
// search for all PAGEdges first
for (const PAGEdge* pagEdge : pag->getValueEdges(value))
{
PAGEdgeToStmtVFGNodeMapTy::const_iterator it = PAGEdgeToStmtVFGNodeMap.find(pagEdge);
if (it != PAGEdgeToStmtVFGNodeMap.end())
{
ret.emplace(it->second);
}
}
// add all PAGNodes
PAGNode* pagNode = pag->getGNode(pag->getValueNode(value));
if(hasDef(pagNode))
{
ret.emplace(getDefSVFGNode(pagNode));
}
return ret;
}

/**
* Get all inter value flow edges at this indirect call site, including call and return edges.
*/
Expand Down

0 comments on commit cfb6657

Please sign in to comment.