take out the loop termination analysis from the java optimization phase. it will...
[IRC.git] / Robust / src / Main / Main.java
index cfdbe0518aec14d964a951ee03aee84910f952b0..e4343618c964e458cf9ffc9c8350d31385295370 100644 (file)
@@ -156,6 +156,8 @@ public class Main {
         state.MULTICORE=true;
       else if (option.equals("-multicoregc"))
         state.MULTICOREGC=true;
+      else if (option.equals("-pmc"))
+        state.PMC=true;
       else if (option.equals("-mgc")) {
         state.MGC = true;
       } else if (option.equals("-objectlockdebug")) {
@@ -204,6 +206,9 @@ public class Main {
       } else if (option.equals("-disjoint-write-ihms")) {
         state.DISJOINTWRITEIHMS = true;
 
+      } else if (option.equals("-disjoint-write-all-node-graphs")) {
+        state.DISJOINT_WRITE_ALL_NODE_FINAL_GRAPHS = true;
+
       } else if (option.equals("-disjoint-alias-file")) {
         state.DISJOINTALIASFILE = args[++i];
         String arg = args[++i];
@@ -357,7 +362,9 @@ public class Main {
         state.NOSTALLTR = true;
       } else if (option.equals("-ssjava")) {
         state.SSJAVA = true;
-      } else if (option.equals("-printlinenum")) {
+      } else if (option.equals("-ssjavadebug")) {
+        state.SSJAVADEBUG = true;
+      }else if (option.equals("-printlinenum")) {
         state.LINENUM=true;
       } else if (option.equals("-help")) {
         System.out.println("-classlibrary classlibrarydirectory -- directory where classlibrary is located");
@@ -418,7 +425,7 @@ public class Main {
     State.logEvent("Done Parsing Commands");
     System.out.println("Classpath: "+state.classpath);
 
-    SSJavaAnalysis ssjava=new SSJavaAnalysis(state);
+    
 
     TypeUtil tu;
     BuildFlat bf;
@@ -476,6 +483,7 @@ public class Main {
     CallGraph callgraph=jb!=null?jb:(state.TASK?new BaseCallGraph(state, tu):new JavaCallGraph(state, tu));
 
     // SSJava
+    SSJavaAnalysis ssjava=new SSJavaAnalysis(state,tu,bf,callgraph);
     if(state.SSJAVA) {
       ssjava.doCheck();
       State.logEvent("Done SSJava Checking");
@@ -502,8 +510,12 @@ public class Main {
             continue;
           cp.optimize(fm);
           dc.optimize(fm);
-          if (!state.NOLOOP)
+          if (!state.NOLOOP){            
+            lo.analyze(fm);
             lo.optimize(fm);
+          }
+            
+          
           cp.optimize(fm);
           dc.optimize(fm);
           lcse.doAnalysis(fm);
@@ -515,6 +527,7 @@ public class Main {
         }
       }
       State.logEvent("Done Optimizing");
+      
     }
 
     if (state.FLATIRGRAPH) {
@@ -672,13 +685,13 @@ public class Main {
           heapAnalysis != null ) {
         // use this extension to generate the allocsite field of Object and
         // ArrayObject for whatever other extensions and systems need it
-        BCXallocsiteObjectField bcx = new BCXallocsiteObjectField( bc, heapAnalysis );
+        BCXallocsiteObjectField bcx = new BCXallocsiteObjectField( bc, tu, heapAnalysis );
         bc.registerExtension( bcx );
       }
 
       if( state.POINTSTO_CHECK_V_RUNTIME &&
           heapAnalysis != null ) {
-        BCXPointsToCheckVRuntime bcx = new BCXPointsToCheckVRuntime( bc, heapAnalysis );
+        BCXPointsToCheckVRuntime bcx = new BCXPointsToCheckVRuntime( state, bc, tu, heapAnalysis );
         bc.registerExtension( bcx );
       }
 
@@ -711,7 +724,7 @@ public class Main {
   public static ParseNode readSourceFile(State state, String sourcefile) {
     try {
       Reader fr= new BufferedReader(new FileReader(sourcefile));
-      Lex.Lexer l = new Lex.Lexer(fr, state.TASK);
+      Lex.Lexer l = new Lex.Lexer(fr, state.TASK, state.DSM);
       java_cup.runtime.lr_parser g;
       g = new Parse.Parser(l);
       ParseNode p=null;