changes.
authoryeom <yeom>
Mon, 2 Aug 2010 01:09:47 +0000 (01:09 +0000)
committeryeom <yeom>
Mon, 2 Aug 2010 01:09:47 +0000 (01:09 +0000)
Robust/src/Analysis/Disjoint/ReachGraph.java
Robust/src/Analysis/OoOJava/ConflictGraph.java
Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java
Robust/src/Analysis/OoOJava/SESELock.java

index fcc94f8a07bc23e9d8a8f4686d53c2bab9cdf33e..b2da61a87c6ee3e970ae09f08bd0c0c3ec8d836c 100644 (file)
@@ -490,7 +490,7 @@ public class ReachGraph {
                                        null,
                                        Canonical.intersection( betaY, betaHrn ),
                                        predsTrue,
-                                       edgeHrn.getTaints()
+                                       Canonical.unionORpreds(edgeHrn.getTaints(),edgeY.getTaints())
                                        );
 
         addEdgeOrMergeWithExisting( edgeNew );
index 58d5cd7346c15ee982e9677951f2b89e5304891d..2db90da1347cdd4d37403940050897ba1088479c 100644 (file)
@@ -190,7 +190,8 @@ public class ConflictGraph {
       }
       
       if( (currentNode.isInVarNode() && entryNode.isInVarNode()) && 
-          (currentNode.getSESEIdentifier()==entryNode.getSESEIdentifier()) ){
+          (currentNode.getSESEIdentifier()==entryNode.getSESEIdentifier()) &&
+          (currentNode.getVar().equals(entryNode.getVar())) ){
         continue;
       }
 
index 21815ea0549825af5478536d4dbc58bc5c44ad10..70eb4012e9b0f14ef4b2fe403aa45b3d833b4937 100644 (file)
@@ -160,7 +160,7 @@ public class OoOJavaAnalysis {
                            rblockRel, 
                            rblockStatus
                            );
-
+    
     // 6th pass, not available analysis FOR VARIABLES!
     methItr = descriptorsToAnalyze.iterator();
     while (methItr.hasNext()) {
@@ -209,6 +209,7 @@ public class OoOJavaAnalysis {
     // for objects that may cause heap conflicts so the most
     // efficient method to deal with conflict can be computed
     // later
+   
     disjointAnalysisReach = 
       new DisjointAnalysis(state, 
                            typeUtil, 
@@ -253,6 +254,22 @@ public class OoOJavaAnalysis {
     }
     
   }
+  
+  private void writeFile(Set<FlatNew> sitesToFlag){
+    
+    try{
+    BufferedWriter bw = new BufferedWriter( new FileWriter( "sitesToFlag.txt" ) );
+    
+    for (Iterator iterator = sitesToFlag.iterator(); iterator.hasNext();) {
+      FlatNew fn = (FlatNew) iterator.next();
+      bw.write( fn+"\n" );
+    }
+    bw.close();
+    }catch(IOException e){
+      
+    }
+   
+  }
 
   private void livenessAnalysisBackward(FlatSESEEnterNode fsen, boolean toplevel,
       Hashtable<FlatSESEExitNode, Set<TempDescriptor>> liveout) {
@@ -1282,6 +1299,12 @@ private void codePlansForward( FlatMethod fm ) {
             // but the edge must remain uncovered.
 
             changed = true;
+            
+            if(seseLock.containsConflictNode(newNode)){
+              seseLock.addEdge(edge);
+              fineToCover.remove(edge);
+              break;
+            }
 
             if (seseLock.isWriteNode(newNode)) {
               if (newNode.isStallSiteNode()) {
index 77533ce54872669e728fd9100f11d1bc074a39e1..4b4e6c6419a4dc2533d3a404623172f888065442 100644 (file)
@@ -110,7 +110,8 @@ public class SESELock {
     } else {
       return null;
     }
-
+    
+    
     int count = 0;
     Set<ConflictEdge> edgeSet = newNode.getEdgeSet();
     for (Iterator iterator = edgeSet.iterator(); iterator.hasNext();) {
@@ -123,10 +124,29 @@ public class SESELock {
         count++;
       }
     }
+    
+    if(conflictNodeSet.contains(newNode)){
+      count++;
+    }
 
-    if (count == conflictNodeSet.size()) {
-      // connected to all current nodes in group
-      return newNode;
+    if(isWriteNode(newNode)){
+      if (count == conflictNodeSet.size()) {
+        // connected to all current nodes in group
+        return newNode;
+      }
+    }else{
+      // it is read node
+      int writeNodeCount=0;
+      for (Iterator iterator = conflictNodeSet.iterator(); iterator.hasNext();) {
+        ConflictNode node = (ConflictNode) iterator.next();
+        if(isWriteNode(node)){
+          writeNodeCount++;
+        }
+      }
+      if (count == writeNodeCount) {
+        // connected to all current write nodes in group
+        return newNode;
+      }
     }
 
     return null;