@Override public BitVectorIntSet makeCopy(IntSet x) throws IllegalArgumentException { if (x == null) { throw new IllegalArgumentException("x == null"); } return new BitVectorIntSet(x); }
public BitVectorKillGen(BitVector kill, BitVector gen) { if (kill == null) { throw new IllegalArgumentException("null kill"); } if (gen == null) { throw new IllegalArgumentException("null gen"); } this.kill = new BitVectorIntSet(kill); this.gen = new BitVectorIntSet(gen); }
public BitVectorFilter(BitVector mask) { if (mask == null) { throw new IllegalArgumentException("null mask"); } this.mask = new BitVectorIntSet(mask); }
@Override public BitVectorIntSet makeCopy(IntSet x) throws IllegalArgumentException { if (x == null) { throw new IllegalArgumentException("x == null"); } return new BitVectorIntSet(x); }
public BitVectorKillGen(BitVector kill, BitVector gen) { if (kill == null) { throw new IllegalArgumentException("null kill"); } if (gen == null) { throw new IllegalArgumentException("null gen"); } this.kill = new BitVectorIntSet(kill); this.gen = new BitVectorIntSet(gen); }
@Override public void intersectWith(IntSet set) { if (!(set instanceof BitVectorIntSet)) { set = new BitVectorIntSet(set); } BitVector B = ((BitVectorIntSet) set).bitVector; bitVector.and(B); populationCount = UNDEFINED; }
@Override public void intersectWith(IntSet set) { if (!(set instanceof BitVectorIntSet)) { set = new BitVectorIntSet(set); } BitVector B = ((BitVectorIntSet) set).bitVector; bitVector.and(B); populationCount = UNDEFINED; }
@Override public boolean addAllInIntersection(IntSet other, IntSet filter) throws IllegalArgumentException { if (other == null) { throw new IllegalArgumentException("other == null"); } BitVectorIntSet o = new BitVectorIntSet(other); o.intersectWith(filter); return addAll(o); }
@Override public boolean addAllInIntersection(IntSet other, IntSet filter) throws IllegalArgumentException { if (other == null) { throw new IllegalArgumentException("other == null"); } BitVectorIntSet o = new BitVectorIntSet(other); o.intersectWith(filter); return addAll(o); }
@Override public IntSet union(IntSet that) { BitVectorIntSet temp = new BitVectorIntSet(); temp.addAll(this); temp.addAll(that); return temp; }
/** */ private boolean addAllInIntersectionGeneral(IntSet other, IntSet filter) { BitVectorIntSet o = new BitVectorIntSet(other); o.intersectWith(filter); return addAll(o); }
@Override public BitVectorIntSet parse(String string) throws NumberFormatException { int[] data = SparseIntSet.parseIntArray(string); BitVectorIntSet result = new BitVectorIntSet(); for (int element : data) { result.add(element); } return result; }
@Override public BitVectorIntSet intersection(IntSet that) { BitVectorIntSet newbie = new BitVectorIntSet(); newbie.copySet(this); newbie.intersectWith(that); return newbie; }
@Override public BitVectorIntSet intersection(IntSet that) { BitVectorIntSet newbie = new BitVectorIntSet(); newbie.copySet(this); newbie.intersectWith(that); return newbie; }
@Override public boolean addAll(IntSet set) { if (set instanceof BitVectorIntSet && !(impl instanceof BitVectorIntSet)) { // change the representation before performing the operation impl = new BitVectorIntSet(impl); } boolean result = impl.addAll(set); if (result) { maybeChangeRepresentation(); } return result; }
@Override public IntSet getSuccNodeNumbers(T node) { BitVectorIntSet succs = new BitVectorIntSet(); for (U label : nodeToSuccLabels.get(node)) { succs.addAll(getSuccNodeNumbers(node, label)); } return succs; }
@Override public IntSet getPredNodeNumbers(T node) { BitVectorIntSet preds = new BitVectorIntSet(); for (U label : nodeToPredLabels.get(node)) { preds.addAll(getPredNodeNumbers(node, label)); } return preds; }
@Override public IntSet getSuccNodeNumbers(T node) { BitVectorIntSet succs = new BitVectorIntSet(); for (U label : nodeToSuccLabels.get(node)) { succs.addAll(getSuccNodeNumbers(node, label)); } return succs; }
/** * @return the set of all locations read by any callee at a call site. */ private static OrdinalSet<PointerKey> unionHeapLocations(CallGraph cg, CGNode n, SSAAbstractInvokeInstruction call, Map<CGNode, OrdinalSet<PointerKey>> loc) { BitVectorIntSet bv = new BitVectorIntSet(); for (CGNode t : cg.getPossibleTargets(n, call.getCallSite())) { bv.addAll(loc.get(t).getBackingSet()); } return new OrdinalSet<>(bv, loc.get(n).getMapping()); }
/** * @return {@link IntSet} representing instruction indices of each PEI in the ir */ private static IntSet getPEIs(final IR ir) { BitVectorIntSet result = new BitVectorIntSet(); for (int i = 0; i < ir.getInstructions().length; i++) { if (ir.getInstructions()[i] != null && ir.getInstructions()[i].isPEI()) { result.add(i); } } return result; }