change: more aggressively re-initialize fields of rcrRecords.
authoryeom <yeom>
Sat, 6 Nov 2010 00:00:21 +0000 (00:00 +0000)
committeryeom <yeom>
Sat, 6 Nov 2010 00:00:21 +0000 (00:00 +0000)
now, rcr is working fine with all benchmarks, except mergesort.

Robust/src/IR/Flat/BuildCode.java
Robust/src/IR/Flat/RuntimeConflictResolver.java

index 92ef2616d9114c01c0b6dacfc806786c8ffd3faf..3cfd382773baa4fb60ef2c459b28842df0857dce 100644 (file)
@@ -4490,6 +4490,8 @@ public class BuildCode {
          Set<Analysis.OoOJava.WaitingElement> weset=seseWaitingQueue.getWaitingElementSet(td);
          int numqueues=weset.size();
          output.println("      seseToIssue->rcrRecords["+i+"].flag="+numqueues+";");
+         output.println("      seseToIssue->rcrRecords["+i+"].index=0;");
+         output.println("      seseToIssue->rcrRecords["+i+"].next=NULL;");
          output.println("      int dispCount"+i+"=0;");
 
          for(Iterator<Analysis.OoOJava.WaitingElement> wtit=weset.iterator();wtit.hasNext();) {
index f09e79fcbf015b18647a11a3390a27c7fc862b4e..a326d8649ec95fe18728997d66a9fc7a2045fb12 100644 (file)
@@ -655,14 +655,15 @@ public class RuntimeConflictResolver {
     if(cases.size() == 0) {
       cFile.println(" return;");
     } else {
-      cFile.println("    int totalcount=RUNBIAS;\n");
-      
+      cFile.println("    int totalcount=RUNBIAS;");      
       if (taint.isStallSiteTaint()) {
-        cFile.println("    record->rcrRecords[0].count=RUNBIAS;\n");
+        cFile.println("    record->rcrRecords[0].count=RUNBIAS;");
+        cFile.println("    record->rcrRecords[0].index=0;");
+        cFile.println("    record->rcrRecords[0].next=NULL;");
       } else {
-        cFile.println("    record->rcrRecords["+index+"].count=RUNBIAS;\n");
-        cFile.println("    record->rcrRecords["+index+"].index=0;\n");
-        cFile.println("    record->rcrRecords["+index+"].next=NULL;\n");
+        cFile.println("    record->rcrRecords["+index+"].count=RUNBIAS;");
+        cFile.println("    record->rcrRecords["+index+"].index=0;");
+        cFile.println("    record->rcrRecords["+index+"].next=NULL;");
       }
       
       //clears queue and hashtable that keeps track of where we've been.