set.add(waitingElement);
map.put(new Integer(waitingElement.getQueueID()), set);
}
-
+
Set<Integer> keySet = map.keySet();
for (Iterator iterator = keySet.iterator(); iterator.hasNext();) {
Integer queueID = (Integer) iterator.next();
Set<WaitingElement> queueWEset = map.get(queueID);
refineQueue(queueID.intValue(), queueWEset, seseDS);
}
+
return seseDS;
}
}
}
- 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
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);
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 ");
}
}
bitvt bit=1<<index;
if (wrmask&bit) {
//count already includes this
- status=READY;
+ status=SPECREADY;
}
b->bitindexwr=bit|wrmask;
b->bitindexrd=bit|rdmask;
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;
}
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;
}
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;
}
#define BINMASK 1\r
#define PARENTBIN 1\r
\r
-#define SPECREADY 3\r
-#define SPECNOTREADY 2\r
-#define READY 1\r
-#define NOTREADY 0\r
+#define SPEC 2\r
+#define READY 1 //Item is ready and we haven't seen this bin before\r
+#define NOTREADY 0 //Item is not ready and we haven't seen this bin before\r
+#define SPECREADY (SPEC|READY) //Item is ready and we've seen this bin before\r
+#define SPECNOTREADY (SPEC|NOTREADY) //Item is not ready and we've seen this bin before\r
#define READYMASK 1\r
+
\r
#define TRUE 1\r
#define FALSE 0\r