fix: handle the case that TASK doesn't have any heap conflicts
[IRC.git] / Robust / src / IR / Flat / RuntimeConflictResolver.java
index cd6278674871640d8ff8739478d02345f0f9ee95..9b580b4d7a9a095072d794067195b60172c46a1a 100644 (file)
@@ -446,9 +446,11 @@ public class RuntimeConflictResolver {
        boolean isValidToPrune=true;
        for( FlatSESEEnterNode parentSESE: fsen.getParents() ) {
          ConflictGraph     graph      = oooa.getConflictGraph(parentSESE);
-          String            id         = tmp + "_sese" + fsen.getPrettyIdentifier();
-         ConflictNode      node       = graph.getId2cn().get(id);
-         isValidToPrune &= node.IsValidToPrune();
+         if(graph!=null){
+      String            id         = tmp + "_sese" + fsen.getPrettyIdentifier();
+      ConflictNode      node       = graph.getId2cn().get(id);
+      isValidToPrune &= node.IsValidToPrune();
+         }
        }
        
        if(isValidToPrune){
@@ -502,9 +504,11 @@ public class RuntimeConflictResolver {
       for (Iterator iterator = seseSet.iterator(); iterator.hasNext();) {
         FlatSESEEnterNode sese = (FlatSESEEnterNode) iterator.next();
         ConflictGraph     graph      = oooa.getConflictGraph(sese);
-        String id = var + "_fn" + stallsite.hashCode();
-        ConflictNode      node       = graph.getId2cn().get(id);
-        isValidToPrune &= node.isTobePruned();
+        if(graph!=null){
+          String id = var + "_fn" + stallsite.hashCode();
+          ConflictNode      node       = graph.getId2cn().get(id);
+          isValidToPrune &= node.isTobePruned();
+        }
       }
       
       cFile.println(    "    case -" + getTraverserID(var, stallsite)+ ": {");