From a265ff8477925a0f10dfb8ff8c021bdfe795cada Mon Sep 17 00:00:00 2001 From: yeom Date: Fri, 8 Apr 2011 17:17:06 +0000 Subject: [PATCH] fix: handle the case that TASK doesn't have any heap conflicts --- Robust/src/IR/Flat/RuntimeConflictResolver.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Robust/src/IR/Flat/RuntimeConflictResolver.java b/Robust/src/IR/Flat/RuntimeConflictResolver.java index cd627867..9b580b4d 100644 --- a/Robust/src/IR/Flat/RuntimeConflictResolver.java +++ b/Robust/src/IR/Flat/RuntimeConflictResolver.java @@ -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)+ ": {"); -- 2.34.1