public void calculateOutSet(Unit u, BoundedFlowSet inSet, BoundedFlowSet outSet) { // If the def set is a subset of the in set, then out = in \ impure use, else // out = (in union def) \ use BoundedFlowSet defSet = defSetMap.get(u); BoundedFlowSet inComplement = (BoundedFlowSet) inSet.clone(); inComplement.complement(); inComplement.intersection(defSet); if (inComplement.size() == 0) { inSet.copy(outSet); outSet.difference(useSetMap.get(u)); } else { inSet.union(defSet, outSet); outSet.difference(useSetMap.get(u)); } }
public void mergeOutSets(List<BoundedFlowSet> outSets, BoundedFlowSet inSet) { // Take the intersection of the out sets as the in set. for (BoundedFlowSet set : outSets) inSet.intersection(set); }