From: jjenista Date: Thu, 30 Apr 2009 21:48:29 +0000 (+0000) Subject: preliminary stall computation working X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=eadfd6de8b33bd2d359c2d8deb1beded4d4ec4cc;p=IRC.git preliminary stall computation working --- diff --git a/Robust/src/Analysis/MLP/MLPAnalysis.java b/Robust/src/Analysis/MLP/MLPAnalysis.java index c4961b63..0b4c9504 100644 --- a/Robust/src/Analysis/MLP/MLPAnalysis.java +++ b/Robust/src/Analysis/MLP/MLPAnalysis.java @@ -525,7 +525,7 @@ public class MLPAnalysis { private void computeStalls_nodeActions( FlatNode fn, VarSrcTokTable vstTable, FlatSESEEnterNode currentSESE ) { - String s = "no op"; + String s = null; switch( fn.kind() ) { @@ -538,27 +538,27 @@ public class MLPAnalysis { } break; default: { - Set stallSet = vstTable.getStallSet( currentSESE ); - Set liveIn = currentSESE.getInVarSet(); - - if( liveIn != null ) { - stallSet.retainAll( liveIn ); - } else { - // there is nothing live, clear all - stallSet.clear(); + Set stallSet = vstTable.getStallSet( currentSESE ); + TempDescriptor[] readarray=fn.readsTemps(); + for(int i=0;i readSet = vstTable.get(readtmp); + //containsAny + for(Iterator readit=readSet.iterator();readit.hasNext();) { + VariableSourceToken vst=readit.next(); + if (stallSet.contains(vst)) { + if (s==null) + s="STALL for:"; + s+="("+vst+" "+readtmp+")"; + } + } + } - - if( !stallSet.isEmpty() ) { - s = "STALL for:"; - Iterator itr = stallSet.iterator(); - while( itr.hasNext() ) { - VariableSourceToken vst = itr.next(); - s += " "+vst.getVarLive()+","; - } - } } break; } // end switch + if (s==null) + s="no op"; codePlan.put( fn, s ); }