primitives passed to a child and then all available stuff copied back at one stall...
authorjjenista <jjenista>
Mon, 3 Aug 2009 18:10:02 +0000 (18:10 +0000)
committerjjenista <jjenista>
Mon, 3 Aug 2009 18:10:02 +0000 (18:10 +0000)
Robust/src/Analysis/MLP/MLPAnalysis.java
Robust/src/Analysis/MLP/VarSrcTokTable.java
Robust/src/IR/Flat/BuildCode.java

index 036ccc5d40681b639e61277131a3e7e385ae3572..752de79ade0509f330246c71a3634b20e7418279 100644 (file)
@@ -144,8 +144,8 @@ public class MLPAnalysis {
       System.out.println( "" );
       //System.out.println( "\nSESE Hierarchy\n--------------\n" ); printSESEHierarchy();
       //System.out.println( "\nSESE Liveness\n-------------\n" ); printSESELiveness();
-      //System.out.println( "\nLiveness Root View\n------------------\n"+fmMain.printMethod( livenessRootView ) );
-      //System.out.println( "\nVariable Results\n----------------\n"+fmMain.printMethod( variableResults ) );
+      System.out.println( "\nLiveness Root View\n------------------\n"+fmMain.printMethod( livenessRootView ) );
+      System.out.println( "\nVariable Results\n----------------\n"+fmMain.printMethod( variableResults ) );
       //System.out.println( "\nNot Available Results\n---------------------\n"+fmMain.printMethod( notAvailableResults ) );
       System.out.println( "\nCode Plans\n----------\n"+fmMain.printMethod( codePlans ) );
     }
@@ -842,29 +842,11 @@ public class MLPAnalysis {
          Iterator<VariableSourceToken> availItr = 
            vstTable.get( vst.getSESE(), vst.getAge() ).iterator();
 
-         /*
-         System.out.println( "Considering a stall on "+vst+
-                             " and also getting\n    "+vstTable.get( vst.getSESE(), 
-                         vst.getAge()
-                         ) );*/
-
-         // only grab additional stuff that is live
-         Set<TempDescriptor> copySet = new HashSet<TempDescriptor>();
-
-         //System.out.println( "*** live in = "+liveSet+" @node "+fn );
-
          while( availItr.hasNext() ) {
            VariableSourceToken vstAlsoAvail = availItr.next();
 
-           /*
-           Iterator<TempDescriptor> refVarItr = 
-             vstAlsoAvail.getRefVars().iterator();
-           
-           
-           if( liveSet.contains( vstAlsoAvail.getAddrVar() ) ) {
-             copySet.add( vstAlsoAvail.getAddrVar() );
-           }
-           */
+           // only grab additional stuff that is live
+           Set<TempDescriptor> copySet = new HashSet<TempDescriptor>();
 
            Iterator<TempDescriptor> refVarItr = vstAlsoAvail.getRefVars().iterator();
            while( refVarItr.hasNext() ) {
@@ -874,10 +856,10 @@ public class MLPAnalysis {
              }
            }
 
-           //System.out.println( vstAlsoAvail+" is available, copySet = "+copySet );
-         }
-                         
-         plan.addStall2CopySet( vst, copySet );
+           if( !copySet.isEmpty() ) {
+             plan.addStall2CopySet( vstAlsoAvail, copySet );
+           }
+         }                      
        }
 
        // assert that everything being stalled for is in the
index 7e16c100d8a8926870eee9caf9f0b2a501130497..0f118c7425f1a7baa5af4ffde0046f6d67c333f2 100644 (file)
@@ -134,11 +134,11 @@ public class VarSrcTokTable {
     return s;
   }
 
-  public Set<VariableSourceToken> get( TempDescriptor var ) {
-    Set<VariableSourceToken> s = var2vst.get( var );
+  public Set<VariableSourceToken> get( TempDescriptor refVar ) {
+    Set<VariableSourceToken> s = var2vst.get( refVar );
     if( s == null ) {
       s = new HashSet<VariableSourceToken>();
-      var2vst.put( var, s );
+      var2vst.put( refVar, s );
     }
     return s;
   }
index 61dcf0b31e79bb8da50049a66539fc2388ab9564..1efb476a4fb671a36e48561cc68b61f0c571377f 100644 (file)
@@ -2227,10 +2227,11 @@ public class BuildCode {
          Iterator<TempDescriptor> tdItr = cp.getCopySet( vst ).iterator();
          while( tdItr.hasNext() ) {
            TempDescriptor td = tdItr.next();
+
            output.println("       "+td.getSafeSymbol()+" = child->"+
                                     vst.getAddrVar().getSafeSymbol()+";");
-           output.println("printf(\"copied %d into "+td.getSafeSymbol()+" from "+vst.getAddrVar().getSafeSymbol()+
-                          "\\n\", "+td.getSafeSymbol()+" );");
+           //output.println("printf(\"copied %d into "+td.getSafeSymbol()+" from "+vst.getAddrVar().getSafeSymbol()+
+           //"\\n\", "+td.getSafeSymbol()+" );");
          }
 
          output.println("   }");
@@ -2746,7 +2747,7 @@ public class BuildCode {
       
       output.println("     "+paramsprefix+"->"+temp.getSafeSymbol()+" = "+temp.getSafeSymbol()+";" );
 
-      output.println("     printf(\" putting "+temp.getSafeSymbol()+" in out with val=%d\\n\", "+temp.getSafeSymbol()+");");
+      //output.println("     printf(\" putting "+temp.getSafeSymbol()+" in out with val=%d\\n\", "+temp.getSafeSymbol()+");");
     }    
     
     // if parent is stalling on you, let them know you're done