- for (int i = 0; i < fn.numNext(); i++) {
- FlatNode nn = fn.getNext(i);
- if (!visited.contains(nn)) {
- flatNodesToVisit.add(nn);
+ ParentChildConflictsMap prevResult = conflictsResults
+ .get(fn);
+
+ // merge sets from control flow
+ ParentChildConflictsMap currentConflictsMap = new ParentChildConflictsMap();
+ for (int i = 0; i < fn.numPrev(); i++) {
+ FlatNode prevFlatNode = fn.getPrev(i);
+ ParentChildConflictsMap incoming = conflictsResults
+ .get(prevFlatNode);
+ if (incoming != null) {
+ currentConflictsMap.merge(incoming);
+ }
+ }
+
+ conflicts_nodeAction(mc, fn, callGraph, preeffectsSet,
+ currentConflictsMap);
+
+ // if we have a new result, schedule forward nodes for
+ // analysis
+
+ if(!currentConflictsMap.isAfterChildSESE()){
+ conflictsResults.put(fn, currentConflictsMap);
+ for (int i = 0; i < fn.numNext(); i++) {
+ FlatNode nn = fn.getNext(i);
+ if (!visited.contains(nn)) {
+ flatNodesToVisit.add(nn);
+ }
+ }
+ }else{
+ if (!currentConflictsMap.equals(prevResult)) {
+ conflictsResults.put(fn, currentConflictsMap);
+ for (int i = 0; i < fn.numNext(); i++) {
+ FlatNode nn = fn.getNext(i);
+ flatNodesToVisit.add(nn);
+ }