From 83256c1698d95490f9d57d45034247c0e938f547 Mon Sep 17 00:00:00 2001 From: Yulei Sui Date: Fri, 24 Jul 2015 10:24:50 +1000 Subject: [PATCH 1/2] Util: Fix thread call graph when connecting indirect fork edges --- include/Util/PTACallGraph.h | 2 +- lib/Util/ThreadCallGraph.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/Util/PTACallGraph.h b/include/Util/PTACallGraph.h index 9e337070a..e34964e8d 100644 --- a/include/Util/PTACallGraph.h +++ b/include/Util/PTACallGraph.h @@ -82,7 +82,7 @@ class PTACallGraphEdge : public GenericCallGraphEdgeTy { void addInDirectCallSite(const llvm::Instruction* call) { assert((llvm::isa(call) || llvm::isa(call)) && "not a call or inovke??"); - assert((NULL == analysisUtil::getCallee(call)) && "not an indirect callsite??"); + assert((NULL == analysisUtil::getCallee(call) || NULL == llvm::dyn_cast (analysisUtil::getForkedFun(call))) && "not an indirect callsite??"); indirectCalls.insert(call); } //@} diff --git a/lib/Util/ThreadCallGraph.cpp b/lib/Util/ThreadCallGraph.cpp index 6cd319dab..06984b23c 100644 --- a/lib/Util/ThreadCallGraph.cpp +++ b/lib/Util/ThreadCallGraph.cpp @@ -76,9 +76,10 @@ void ThreadCallGraph::updateCallGraph(PointerAnalysis* pta) { } for (CallSiteSet::iterator it = forksitesBegin(), eit = forksitesEnd(); it != eit; ++it) { - if(dyn_cast(tdAPI->getForkedFun(*it))==NULL) { + const Value* forkedval=tdAPI->getForkedFun(*it); + if(dyn_cast(forkedval)==NULL) { PAG* pag = pta->getPAG(); - const PointsTo& targets = pta->getPts(pag->getValueNode(*it)); + const PointsTo& targets = pta->getPts(pag->getValueNode(forkedval)); for (PointsTo::iterator ii = targets.begin(), ie = targets.end(); ii != ie; ii++) { if(ObjPN* objPN = dyn_cast(pag->getPAGNode(*ii))) { const MemObj* obj = pag->getObject(objPN); From e4ec7b89e4525859d8c2decda0982870a1b64cf7 Mon Sep 17 00:00:00 2001 From: Yulei Sui Date: Fri, 24 Jul 2015 10:37:23 +1000 Subject: [PATCH 2/2] Update index.html --- index.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.html b/index.html index ec24aee01..13fe60170 100644 --- a/index.html +++ b/index.html @@ -68,6 +68,11 @@

Yulei Sui, Sen Ye, Jingling Xue, and Pen-Chung Yew. SPAS: Scalable Path-Sensitive Pointer Analysis on Full-Sparse SSA, 9th Asian Symposium on Programming Languages and Systems (APLAS'11)

+

+Contacts

+Any comments, contributions and collaborations are welcomed. +Please contact Yulei Sui or Jingling Xue if you have any questions. +