From 85da2d8c4ffb017f6a5f314281c71a7b88d02d68 Mon Sep 17 00:00:00 2001 From: yeom Date: Fri, 12 Nov 2010 00:56:40 +0000 Subject: [PATCH] changes: generates WT_BIN_CASE only in the case that the read effect has downstream conflicts. --- Robust/src/IR/Flat/RuntimeConflictResolver.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Robust/src/IR/Flat/RuntimeConflictResolver.java b/Robust/src/IR/Flat/RuntimeConflictResolver.java index 505edc75..6393b3fd 100644 --- a/Robust/src/IR/Flat/RuntimeConflictResolver.java +++ b/Robust/src/IR/Flat/RuntimeConflictResolver.java @@ -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"); -- 2.34.1