From: bdemsky Date: Wed, 20 Oct 2010 23:53:27 +0000 (+0000) Subject: changes X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=3da2d5c260858e364a639b01c8b8772b3a083be0;hp=0bb6ab852f594856b548e10d76114f87fc08ecf1;p=IRC.git changes --- diff --git a/Robust/src/Analysis/OoOJava/ConflictGraph.java b/Robust/src/Analysis/OoOJava/ConflictGraph.java index 81696a2a..a7e07c93 100644 --- a/Robust/src/Analysis/OoOJava/ConflictGraph.java +++ b/Robust/src/Analysis/OoOJava/ConflictGraph.java @@ -585,13 +585,14 @@ public class ConflictGraph { set.add(waitingElement); map.put(new Integer(waitingElement.getQueueID()), set); } - + Set keySet = map.keySet(); for (Iterator iterator = keySet.iterator(); iterator.hasNext();) { Integer queueID = (Integer) iterator.next(); Set queueWEset = map.get(queueID); refineQueue(queueID.intValue(), queueWEset, seseDS); } + return seseDS; } diff --git a/Robust/src/IR/Flat/BuildCode.java b/Robust/src/IR/Flat/BuildCode.java index 9b261737..e433898f 100644 --- a/Robust/src/IR/Flat/BuildCode.java +++ b/Robust/src/IR/Flat/BuildCode.java @@ -4262,11 +4262,10 @@ public class BuildCode { } } - public void generateFlatSESEExitNode( FlatMethod fm, - LocalityBinding lb, - FlatSESEExitNode fsexn, - PrintWriter output - ) { + public void generateFlatSESEExitNode( FlatMethod fm, + LocalityBinding lb, + FlatSESEExitNode fsexn, + PrintWriter output) { // if MLP flag is off, okay that SESE nodes are in IR graph, // just skip over them and code generates exactly the same diff --git a/Robust/src/IR/Flat/RuntimeConflictResolver.java b/Robust/src/IR/Flat/RuntimeConflictResolver.java index 83b216b9..dee52e16 100644 --- a/Robust/src/IR/Flat/RuntimeConflictResolver.java +++ b/Robust/src/IR/Flat/RuntimeConflictResolver.java @@ -804,13 +804,12 @@ public class RuntimeConflictResolver { String structType = ref.child.original.getType().getSafeSymbol(); currCase.append(" struct " + structType + " * "+currPtr+"= (struct "+ structType + " * ) " + childPtr + ";\n"); - // Checks if the child exists and has allocsite matching the conflict currCase.append(" if (" + currPtr + " != NULL && " + currPtr + getAllocSiteInC + "==" + ref.allocSite + ") {\n"); if (ref.child.decendantsConflict() || ref.child.hasPrimitiveConflicts()) { // Checks if we have visited the child before - + currCase.append(" if (" + queryVistedHashtable +"("+ currPtr + ")) {\n"); if (ref.child.getNumOfReachableParents() == 1 && !ref.child.isInsetVar) { addChecker(taint, ref.child, cases, currCase, currPtr, depth + 1); @@ -818,14 +817,12 @@ public class RuntimeConflictResolver { else { currCase.append(" " + addToQueueInC + childPtr + ");\n "); } - currCase.append(" }\n"); } //one more brace for the opening if if(ref.hasDirectObjConflict()) { currCase.append(" }\n"); } - currCase.append(" }\n "); } } diff --git a/Robust/src/Runtime/oooJava/hashStructure.c b/Robust/src/Runtime/oooJava/hashStructure.c index 02970aab..b66ca0f1 100644 --- a/Robust/src/Runtime/oooJava/hashStructure.c +++ b/Robust/src/Runtime/oooJava/hashStructure.c @@ -114,7 +114,7 @@ int rcr_WRITEBINCASE(HashStructure *T, void *ptr, SESEcommon *task, int index) { bitvt bit=1<bitindexwr=bit|wrmask; b->bitindexrd=bit|rdmask; @@ -128,7 +128,10 @@ int rcr_WRITEBINCASE(HashStructure *T, void *ptr, SESEcommon *task, int index) { if (val==((BinItem_rcr *)b)) { b->item.status=READY; be->head=val; - return READY; + if (status&SPEC) + return SPECREADY; + else + return READY; } val=val->next; } @@ -181,10 +184,9 @@ int rcr_READBINCASE(HashStructure *T, void *ptr, SESEcommon * task, int index) { if (!(td->bitindexrd & bit)) { td->bitindexrd|=bit; td->bitindexwr|=bit; - if (status==NOTREADY) - status=SPECNOTREADY; + status=status|SPEC; } else - status=READY; + status=SPECREADY; be->head=val; return status; } @@ -196,10 +198,9 @@ int rcr_READBINCASE(HashStructure *T, void *ptr, SESEcommon * task, int index) { int status=bintail->status; if (!(td->bitindex & bit)) { td->bitindex|=bit; - if (status==NOTREADY) - status=SPECNOTREADY; + status=status|SPEC; } else - status=READY; + status=SPECREADY; be->head=val; return status; } diff --git a/Robust/src/Runtime/oooJava/hashStructure.h b/Robust/src/Runtime/oooJava/hashStructure.h index 6932bd00..65dd9a42 100644 --- a/Robust/src/Runtime/oooJava/hashStructure.h +++ b/Robust/src/Runtime/oooJava/hashStructure.h @@ -19,11 +19,13 @@ #define BINMASK 1 #define PARENTBIN 1 -#define SPECREADY 3 -#define SPECNOTREADY 2 -#define READY 1 -#define NOTREADY 0 +#define SPEC 2 +#define READY 1 //Item is ready and we haven't seen this bin before +#define NOTREADY 0 //Item is not ready and we haven't seen this bin before +#define SPECREADY (SPEC|READY) //Item is ready and we've seen this bin before +#define SPECNOTREADY (SPEC|NOTREADY) //Item is not ready and we've seen this bin before #define READYMASK 1 + #define TRUE 1 #define FALSE 0