83 for (
auto it = target->InEdgeBegin(); it != target->InEdgeEnd(); ++it)
118 if (
const auto*
indirect = SVFUtil::dyn_cast<IndirectSVFGEdge>(
edge))
137 const ICFGNode* target =
edge->getDstNode()->getICFGNode();
139 if (
const auto*
indirect = SVFUtil::dyn_cast<IndirectSVFGEdge>(
edge))
145 if (
input.getLocToVal().empty() &&
objs.empty())
186 while (!worklist.
empty())
189 if (current == target)
213 if (
const auto* store = SVFUtil::dyn_cast<StoreStmt>(stmt))
237 std::vector<std::pair<const ICFGNode*, const IntraCFGEdge*>> successors;
238 if (
const auto* call = SVFUtil::dyn_cast<CallICFGNode>(current))
241 if (call->getCalledFunction() &&
290 if (
const auto*
indirect = SVFUtil::dyn_cast<IndirectSVFGEdge>(
retEdge))
332 successors.emplace_back(
retNode,
nullptr);
344 if (
const auto*
intra = SVFUtil::dyn_cast<IntraCFGEdge>(
out))
345 successors.emplace_back(
intra->getDstNode(),
intra);
507 for (
const auto& [
id,
val] :
next.getVarToVal())
526 for (
const auto& [
id,
val] :
next.getVarToVal())
568 if (!
var->getICFGNode())
573 else if (SVFUtil::isa<CallICFGNode>(
var->getICFGNode()) &&
574 SVFUtil::isa<RetValPN>(
var))
576 return SVFUtil::dyn_cast<CallICFGNode>(
var->getICFGNode())
583 return var->getICFGNode();
AndersenWaveDiff * getPointerAnalysis() const
Accessors for Andersen's results.
const Set< const ValVar * > getCycleValVars(const ICFGCycleWTO *cycle) const
AbstractState & getAbsState(const ICFGNode *node)
virtual bool narrowCycleState(const AbstractState &prev, const AbstractState &cur, const ICFGCycleWTO *cycle)
bool isStrongUpdate(const AddressValue &targets, const AbstractState &state) const
virtual bool hasAbsValue(const ValVar *var, const ICFGNode *node) const
Side-effect-free existence check.
virtual AbstractState getFullCycleHeadState(const ICFGCycleWTO *cycle)
bool isBranchEdgeFeasible(const IntraCFGEdge *edge, AbstractState &as)
virtual bool widenCycleState(const AbstractState &prev, const AbstractState &cur, const ICFGCycleWTO *cycle)
bool applyBranchRefinement(const IntraCFGEdge *edge, AbstractState &as)
virtual bool mergeStatesFromPredecessors(const ICFGNode *node)
SVFIR * svfir
Data and helpers reachable from SparseAbstractInterpretation.
virtual const AbstractValue & getAbsValue(const ValVar *var, const ICFGNode *node)
bool hasAbsState(const ICFGNode *node)
Map< const ICFGNode *, AbstractState > abstractTrace
per-node trace; owned here
const AddrToAbsValMap & getLocToVal() const
get loc2val map
u32_t getIDFromAddr(u32_t addr) const
Return the internal index if addr is an address otherwise return the value of idx.
void store(u32_t addr, const AbstractValue &val)
void joinWith(const AbstractState &other)
domain join with other, important! other widen this.
const Set< NodeID > & getFreedAddrs() const
virtual AbstractValue & load(u32_t addr)
static u32_t getVirtualMemAddress(u32_t idx)
The physical address starts with 0x7f...... + idx.
void addToFreedAddrs(NodeID addr)
void updateAddrStateOnly(const AbstractState &other)
Replace address-taken (ObjVar) state with other's, preserving ValVar state.
void join_with(const AbstractValue &other)
AddressValue & getAddrs()
bool push(const Data &data)
void joinStates(AbstractState &dst, const AbstractState &src, const NodeBS &objs)
bool mergeStatesFromPredecessors(const ICFGNode *node) override
AbstractState filterValueFlowInputByPath(const VFGEdge *edge, const AbstractState &input)
AbstractState CollectObjValueFlowInput(const VFGEdge *edge, NodeBS &objs)
std::unique_ptr< SVFGBuilder > svfgBuilder
~FullSparseAbstractInterpretation() override
void mergeFreedAddrs(AbstractState &dst, const AbstractState &src)
const GEdgeSetTy & getOutEdges() const
virtual const FunObjVar * getFun() const
Return the function of this ICFGNode.
const VFGNodeList & getVFGNodes() const
const SVFStmtList & getSVFStmts() const
GlobalICFGNode * getGlobalICFGNode() const
const BaseObjVar * getBaseObject(NodeID id) const
NodeBS & getAllFieldsObjVars(const BaseObjVar *obj)
Get all fields of an object.
const SVFVar * getSVFVar(NodeID id) const
ObjVar/GepObjVar/BaseObjVar.
bool narrowCycleState(const AbstractState &prev, const AbstractState &cur, const ICFGCycleWTO *cycle) override
const AbstractValue & getAbsValue(const ValVar *var, const ICFGNode *node) override
AbstractState getFullCycleHeadState(const ICFGCycleWTO *cycle) override
void joinStates(AbstractState &dst, const AbstractState &src) override
bool widenCycleState(const AbstractState &prev, const AbstractState &cur, const ICFGCycleWTO *cycle) override
void updateAbsValue(const ValVar *var, const AbstractValue &val, const ICFGNode *node) override
bool hasAbsValue(const ValVar *var, const ICFGNode *node) const override
Side-effect-free existence check.
void updateAbsState(const ICFGNode *node, const AbstractState &state) override
const ICFGNode * getICFGNode(const ValVar *var) const
bool isExtCall(const FunObjVar *fun)
llvm::IRBuilder IRBuilder