use of soot.toolkits.scalar.FlowSet in project soot by Sable.
the class StartJoinAnalysis method merge.
protected void merge(Object in1, Object in2, Object out) {
FlowSet inSet1 = (FlowSet) in1;
FlowSet inSet2 = (FlowSet) in2;
FlowSet outSet = (FlowSet) out;
inSet1.intersection(inSet2, outSet);
}
use of soot.toolkits.scalar.FlowSet in project soot by Sable.
the class StartJoinAnalysis method copy.
protected void copy(Object source, Object dest) {
FlowSet sourceSet = (FlowSet) source;
FlowSet destSet = (FlowSet) dest;
sourceSet.copy(destSet);
}
use of soot.toolkits.scalar.FlowSet in project soot by Sable.
the class SimpleVeryBusyAnalysis method kill.
/**
* Performs kills by generating a killSet and then performing<br/>
* outSet <- inSet - killSet<br/>
* The kill set is generated by iterating over the def-boxes
* of the unit. For each local defined in the unit we iterate
* over the binopExps in the inSet, and check whether they use
* that local. If so, it is added to the kill set.
* @param inSet the set flowing into the unit
* @param u the unit being flown through
* @param outSet the set flowing out of the unit
*/
private void kill(FlowSet inSet, Unit u, FlowSet outSet) {
FlowSet kills = emptySet.clone();
for (ValueBox defBox : u.getDefBoxes()) {
if (defBox.getValue() instanceof Local) {
Iterator<BinopExpr> inIt = inSet.iterator();
while (inIt.hasNext()) {
BinopExpr e = inIt.next();
Iterator<ValueBox> eIt = e.getUseBoxes().iterator();
while (eIt.hasNext()) {
ValueBox useBox = eIt.next();
if (useBox.getValue() instanceof Local && useBox.getValue().equivTo(defBox.getValue()))
kills.add(e);
}
}
}
}
inSet.difference(kills, outSet);
}
Aggregations