34 using namespace SVFUtil;
48 csc =
new CSC(_graph, scc.get());
51 getSCCDetector()->find();
62 csc->find(getSCCDetector()->topoNodeStack());
89 if (!dst->
strides.
empty() && SVFUtil::isa<NormalGepCGEdge>(edge))
92 PointsTo srcInits = pts - getPts(dstId);
94 if (!srcInits.
empty())
97 for (
NodeID ptd : srcInits)
98 sortSrcInits.insert(ptd);
100 APOffset offset = SVFUtil::dyn_cast<NormalGepCGEdge>(edge)->getConstantFieldIdx();
104 if (unionPts(dstId, tmpDstPts))
106 pushIntoWorklist(dstId);
124 while (!initials.empty())
126 NodeID init = *initials.begin();
127 initials.erase(init);
129 if (consCG->isBlkObjOrConstantObj(init))
133 PAGNode* initPN = pag->getGNode(init);
134 const MemObj* obj = pag->getBaseObj(init);
137 if (
GepObjVar *gepNode = SVFUtil::dyn_cast<GepObjVar>(initPN))
138 initOffset = gepNode->getConstantFieldIdx();
139 else if (SVFUtil::isa<FIObjVar, DummyObjVar>(initPN))
143 assert(
false &&
"Not an object node!!");
151 bool loopFlag =
true;
155 for (
auto _f : offsets)
156 for (
auto _s : strides)
159 loopFlag = (offsets.find(_f1) == offsets.end()) && ( (
u32_t)(initOffset + _f1) < maxLimit);
168 NodeID gepId = consCG->getGepObjVar(init, _f);
169 initials.erase(gepId);
170 expandPts.
set(gepId);
void initialize()
Initialize analysis.
bool processGepPts(const PointsTo &pts, const GepCGEdge *edge)
void fieldExpand(NodeSet &initials, APOffset offset, NodeBS &strides, PointsTo &expandPts)
static AndersenSFR * sfrAndersen
bool mergeSrcToTgt(NodeID nodeId, NodeID newRepId)
virtual void initialize()
Initialize analysis.
virtual bool processGepPts(const PointsTo &pts, const GepCGEdge *edge)
virtual bool mergeSrcToTgt(NodeID srcId, NodeID tgtId)
NodeBS strides
For stride-based field representation.
NodeType * getDstNode() const
u32_t getMaxFieldOffsetLimit() const
Get max field offset limit.
bool empty() const
Returns true if set is empty.
void set(u32_t n)
Inserts n in the set.
NodeID getId() const
Get ID.
std::unordered_set< Key, Hash, KeyEqual, Allocator > Set