Esempio n. 1
0
/*!
 * Expand all fields of an aggregate in all points-to sets
 */
void BVDataPTAImpl::expandFIObjs(const PointsTo& pts, PointsTo& expandedPts) {
    expandedPts = pts;;
    for(PointsTo::iterator pit = pts.begin(), epit = pts.end(); pit!=epit; ++pit) {
        if(pag->getBaseObjNode(*pit)==*pit) {
            expandedPts |= pag->getAllFieldsObjNode(*pit);
        }
    }
}
Esempio n. 2
0
/*!
 * Add copy edges which haven't been added before
 */
bool AndersenWaveDiff::handleStore(NodeID node, const ConstraintEdge* edge)
{
    /// calculate diff pts.
    PointsTo & cache = getCachePts(edge);
    PointsTo & pts = getPts(node);
    PointsTo newPts;
    newPts.intersectWithComplement(pts, cache);
    cache |= newPts;

    bool changed = false;
    for (PointsTo::iterator piter = newPts.begin(), epiter = newPts.end(); piter != epiter; ++piter) {
        NodeID ptdId = *piter;
        if (processStore(ptdId, edge)) {
            changed = true;
        }
    }

    return changed;
}