Skip to content

Commit

Permalink
remove getCurES and CurNode
Browse files Browse the repository at this point in the history
  • Loading branch information
bjjwwang committed Apr 17, 2024
1 parent 2d05164 commit 3d51d88
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions svf-llvm/tools/Example/svf-ex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,32 +78,32 @@ std::string printPts(PointerAnalysis* pta, const SVFValue* svfval)
void traverseOnSVFStmt(const ICFGNode* node)
{
AbstractState es;
SVFIR2AbsState* svfir2ExeState = new SVFIR2AbsState(SVFIR::getPAG());
SVFIR2AbsState* svfir2AbsState = new SVFIR2AbsState(SVFIR::getPAG());
for (const SVFStmt* stmt: node->getSVFStmts())
{
if (const AddrStmt *addr = SVFUtil::dyn_cast<AddrStmt>(stmt))
{
svfir2ExeState->handleAddr(es, addr);
svfir2AbsState->handleAddr(es, addr);
}
else if (const BinaryOPStmt *binary = SVFUtil::dyn_cast<BinaryOPStmt>(stmt))
{
svfir2ExeState->handleBinary(es, binary);
svfir2AbsState->handleBinary(es, binary);
}
else if (const CmpStmt *cmp = SVFUtil::dyn_cast<CmpStmt>(stmt))
{
svfir2ExeState->handleCmp(es, cmp);
svfir2AbsState->handleCmp(es, cmp);
}
else if (const LoadStmt *load = SVFUtil::dyn_cast<LoadStmt>(stmt))
{
svfir2ExeState->handleLoad(es, load);
svfir2AbsState->handleLoad(es, load);
}
else if (const StoreStmt *store = SVFUtil::dyn_cast<StoreStmt>(stmt))
{
svfir2ExeState->handleStore(es, store);
svfir2AbsState->handleStore(es, store);
}
else if (const CopyStmt *copy = SVFUtil::dyn_cast<CopyStmt>(stmt))
{
svfir2ExeState->handleCopy(es, copy);
svfir2AbsState->handleCopy(es, copy);
}
else if (const GepStmt *gep = SVFUtil::dyn_cast<GepStmt>(stmt))
{
Expand All @@ -112,24 +112,24 @@ void traverseOnSVFStmt(const ICFGNode* node)
gep->accumulateConstantByteOffset();
gep->accumulateConstantOffset();
}
svfir2ExeState->handleGep(es, gep);
svfir2AbsState->handleGep(es, gep);
}
else if (const SelectStmt *select = SVFUtil::dyn_cast<SelectStmt>(stmt))
{
svfir2ExeState->handleSelect(es, select);
svfir2AbsState->handleSelect(es, select);
}
else if (const PhiStmt *phi = SVFUtil::dyn_cast<PhiStmt>(stmt))
{
svfir2ExeState->handlePhi(es, phi);
svfir2AbsState->handlePhi(es, phi);
}
else if (const CallPE *callPE = SVFUtil::dyn_cast<CallPE>(stmt))
{
// To handle Call Edge
svfir2ExeState->handleCall(es, callPE);
svfir2AbsState->handleCall(es, callPE);
}
else if (const RetPE *retPE = SVFUtil::dyn_cast<RetPE>(stmt))
{
svfir2ExeState->handleRet(es, retPE);
svfir2AbsState->handleRet(es, retPE);
}
else
assert(false && "implement this part");
Expand Down

0 comments on commit 3d51d88

Please sign in to comment.