76 SVFVar* svfVar = it->second;
87 worklist.push_back(it->first);
91 while(!worklist.empty())
93 NodeID id = worklist.back();
125 NodeToPTSSMap::iterator it = cachedPtsMap.find(baseId);
126 if(it!=cachedPtsMap.end())
132 PointsTo& pts = cachedPtsMap[baseId];
152 while(!worklist.
empty())
190 const SVFGNode* def =
svfg->getDefSVFGNode(store->getDstNode());
192 svfg->removeSVFGEdge(edge);
203 const SVFGNode* def =
svfg->getDefSVFGNode(load->getSrcNode());
205 svfg->removeSVFGEdge(edge);
228 if (dstCPSet.
count() == 1)
237 if (
SVFIR::getPAG()->getBaseObject(singleton)->isFieldInsensitive() ==
false
275 if ((*it2)->isIndirectVFGEdge())
277 toRemove.insert(*it2);
283 saberCondAllocator->getRemovedSUVFEdges()[edge->getSrcNode()].insert(edge->getDstNode());
284 svfg->removeSVFGEdge(edge);
302 for (CallGraph::FunctionSet::const_iterator cit = callees.begin(),
303 ecit = callees.end(); cit != ecit; cit++)
311 for(SVFIR::ValVarList::const_iterator ait = arglist.begin(), aeit = arglist.end(); ait!=aeit; ++ait)
313 const ValVar *svfVar = *ait;
317 svfg->addIntraDirectVFEdge(
svfg->getDefSVFGNode(svfVar)->getId(),
svfg->getActualParmVFGNode(svfVar, it->first)->getId());
#define DBOUT(TYPE, X)
LLVM debug macros, define type of your DBUG model of each pass.
const PointsTo & getPts(NodeID id) override
void getCallees(const CallICFGNode *cs, FunctionSet &callees)
Get all callees for a callsite.
Set< const FunObjVar * > FunctionSet
bool push(const Data &data)
iterator begin()
Iterators.
IDToNodeMapTy::iterator iterator
BVDataPTAImpl * getPTA() const
Return PTA.
static const Option< bool > CollectExtRetGlobals
bool isLocalVarInRecursiveFun(NodeID id) const
Whether a local variable is in function recursions.
bool printStat()
Whether print statistics.
CallGraph * getCallGraph() const
Return call graph.
bool isArrayMemObj(NodeID id) const
bool isHeapMemObj(NodeID id) const
Whether this object is heap or array.
bool isFIObjNode(NodeID id) const
const_iterator end() const
u32_t count() const
Returns number of elements.
void set(u32_t n)
Inserts n in the set.
const_iterator begin() const
bool intersects(const PointsTo &rhs) const
Returns true if this set and rhs share any elements.
std::unique_ptr< SVFG > svfg
CSToArgsListMap & getCallSiteArgsMap()
Get callsite argument list.
NodeID getBaseObjVarID(NodeID id) const
Base and Offset methods for Value and Object node.
NodeBS getFieldsAfterCollapse(NodeID id)
std::vector< const ValVar * > ValVarList
const BaseObjVar * getBaseObject(NodeID id) const
const SVFVar * getSVFVar(NodeID id) const
ObjVar/GepObjVar/BaseObjVar.
static SVFIR * getPAG(bool buildFromFile=false)
Singleton design here to make sure we only have one instance during any analysis.
const ValVar * getBaseValVar(NodeID id) const
NodeID getId() const
Get ID.
virtual bool isPointer() const
Check if this variable represents a pointer.
static SaberCheckerAPI * getCheckerAPI()
Return a static reference.
bool isStrongUpdate(const SVFGNode *node, NodeID &singleton, BVDataPTAImpl *pta)
Return TRUE if this is a strong update STORE statement.
void addActualParmVFGNode(const ValVar *svfVar, const CallICFGNode *cs)
Add ActualParmVFGNode.
void collectGlobals(BVDataPTAImpl *pta)
PointsTo & CollectPtsChain(BVDataPTAImpl *pta, NodeID id, NodeToPTSSMap &cachedPtsMap)
Collect objects along points-to chains.
Map< NodeID, PointsTo > NodeToPTSSMap
virtual void buildSVFG()
Re-write create SVFG method.
FIFOWorkList< NodeID > WorkList
SVFGNodeSet globSVFGNodes
Store all global SVFG nodes.
bool accessGlobal(BVDataPTAImpl *pta, const SVFVar *svfVar)
Whether points-to of a SVFVar points-to global variable.
virtual void AddExtActualParmSVFGNodes(CallGraph *callgraph)
Add actual parameter SVFGNode for 1st argument of a deallocation like external function.
SaberCondAllocator * saberCondAllocator
void rmDerefDirSVFGEdges(BVDataPTAImpl *pta)
virtual void rmIncomingEdgeForSUStore(BVDataPTAImpl *pta)
VFGEdge::VFGEdgeSetTy::const_iterator const_iterator
VFGNodeIDToNodeMapTy::iterator iterator
const ICFGNode * getICFGNode() const
std::string pasMsg(const std::string &msg)
Print each pass/phase message by converting a string into blue string output.
LLVM_NODISCARD bool isa(const Y &Val)
bool isExtCall(const FunObjVar *fun)
std::ostream & outs()
Overwrite llvm::outs().
LLVM_NODISCARD std::enable_if_t<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type > dyn_cast(const Y &Val)
std::vector< NodeID > NodeVector
std::unordered_set< Key, Hash, KeyEqual, Allocator > Set
StoreVFGNode StoreSVFGNode