interface to grab the conflict effect set for Stephen,
[IRC.git] / Robust / src / IR / Flat / BuildCode.java
index 3bd86e8d45f21f2c34c518dba5182604d6185501..5159f7ebbb051af5b165bed52e0f572ea66836b0 100644 (file)
@@ -23,6 +23,9 @@ import Analysis.Locality.DCWrapper;
 import Analysis.Locality.DelayComputation;
 import Analysis.Locality.BranchAnalysis;
 import Analysis.CallGraph.CallGraph;
+import Analysis.Disjoint.Effect;
+import Analysis.Disjoint.ReachGraph;
+import Analysis.Disjoint.Taint;
 import Analysis.OoOJava.OoOJavaAnalysis;
 import Analysis.Prefetch.*;
 import Analysis.Loops.WriteBarrier;
@@ -255,6 +258,25 @@ public class BuildCode {
       while(seseit.hasNext()){
         FlatSESEEnterNode fsen = seseit.next();
         initializeSESE( fsen );
+        
+        /*
+        if(state.RCR){
+          if(!fsen.getIsCallerSESEplaceholder() && fsen.getParent()!=null){
+            
+            FlatMethod fm=fsen.getfmEnclosing();
+            
+            //reach graph
+            ReachGraph rg=oooa.getDisjointAnalysis().getReachGraph(fm.getMethod());
+            
+            //get effect set
+            Hashtable<Taint, Set<Effect>>  effects=oooa.getDisjointAnalysis().getEffectsAnalysis().get(fsen);
+            
+            //get conflict set
+            Analysis.OoOJava.ConflictGraph conflictGraph=oooa.getConflictGraph(fsen.getParent());
+            Hashtable<Taint, Set<Effect>>  conflicts=conflictGraph.getConflictEffectSet(fsen);
+          }
+        }
+        */
       }
       
     }
@@ -329,6 +351,7 @@ public class BuildCode {
 
     if (state.MLP || state.OOOJAVA) {
       //outmethod.println("  pthread_once( &mlpOnceObj, mlpInitOncePerThread );");
+
       outmethod.println("  workScheduleInit( "+state.MLP_NUMCORES+", invokeSESEmethod );");
     }
 
@@ -524,7 +547,9 @@ public class BuildCode {
       outmethod.println("#include \"mlp_runtime.h\"");
       outmethod.println("#include \"psemaphore.h\"");
     }
-
+    if (state.COREPROF) {
+      outmethod.println("#include \"coreprof\\coreprof.h\"");
+    }
 
     //Store the sizes of classes & array elements
     generateSizeArray(outmethod);
@@ -2342,6 +2367,10 @@ public class BuildCode {
           (state.OOOJAVA && fsen.equals( oooa.getMainSESE() ))
       ) {
        outmethod.println(  "      /* work scheduler works forever, explicitly exit */");
+       if (state.COREPROF) {
+         outmethod.println("EXITPROFILER();");
+         outmethod.println("DUMPPROFILER();");
+       }
        outmethod.println(  "      exit( 0 );");
       }