changes: generates WT_BIN_CASE only in the case that the read effect has downstream...
authoryeom <yeom>
Fri, 12 Nov 2010 00:56:40 +0000 (00:56 +0000)
committeryeom <yeom>
Fri, 12 Nov 2010 00:56:40 +0000 (00:56 +0000)
Robust/src/IR/Flat/RuntimeConflictResolver.java

index 505edc753b29e59c05f2ee97052f2365c3558931..6393b3fdc150d61e95c39ca3ab76e304cbb09ded 100644 (file)
@@ -796,6 +796,7 @@ public class RuntimeConflictResolver {
     boolean primConfWrite=false;
     boolean objConfRead=false;
     boolean objConfWrite=false;
+    boolean descendantConflict=false;
 
     //Direct Primitives Test
     for(String field: curr.primitiveConflictingFields.keySet()) {
@@ -813,6 +814,10 @@ public class RuntimeConflictResolver {
       }
     }
 
+    if (objConfRead) {
+       descendantConflict=curr.decendantsConflict();
+    }
+
     int index=0;
     if (taint.isRBlockTaint()) {
       FlatSESEEnterNode fsese=taint.getSESE();
@@ -830,7 +835,7 @@ public class RuntimeConflictResolver {
       int allocSiteID = connectedHRHash.get(taint).getWaitingQueueBucketNum(curr);
       int traverserID = doneTaints.get(taint);
         currCase.append("    int tmpkey"+depth+"=rcr_generateKey("+prefix+");\n");
-      if (objConfRead)
+      if (descendantConflict)
         currCase.append("    int tmpvar"+depth+"=rcr_WTWRITEBINCASE(allHashStructures["+heaprootNum+"], tmpkey"+depth+", "+tasksrc+strrcr+index+");\n");
       else
         currCase.append("    int tmpvar"+depth+"=rcr_WRITEBINCASE(allHashStructures["+heaprootNum+"], tmpkey"+depth+", "+ tasksrc+strrcr+index+");\n");
@@ -840,7 +845,7 @@ public class RuntimeConflictResolver {
       int allocSiteID = connectedHRHash.get(taint).getWaitingQueueBucketNum(curr);
       int traverserID = doneTaints.get(taint);
       currCase.append("    int tmpkey"+depth+"=rcr_generateKey("+prefix+");\n");
-      if (objConfRead) 
+      if (descendantConflict)
         currCase.append("    int tmpvar"+depth+"=rcr_WTREADBINCASE(allHashStructures["+heaprootNum+"], tmpkey"+depth+", "+tasksrc+strrcr+index+");\n");
       else
         currCase.append("    int tmpvar"+depth+"=rcr_READBINCASE(allHashStructures["+heaprootNum+"], tmpkey"+depth+", "+tasksrc+strrcr+index+");\n");