Stack<FlatSESEEnterNode> seseStack = seseStacks.get( fn );
assert seseStack != null;
- VarSrcTokTable vstTable = variableResults.get( fn );
+ // use incoming results as "dot statement" or just
+ // before the current statement
+ VarSrcTokTable dotST = new VarSrcTokTable();
+ for( int i = 0; i < fn.numPrev(); i++ ) {
+ FlatNode nn = fn.getPrev( i );
+ dotST.merge( variableResults.get( nn ) );
+ }
- computeStalls_nodeActions( fn, vstTable, seseStack.peek() );
+ computeStalls_nodeActions( fn, dotST, seseStack.peek() );
for( int i = 0; i < fn.numNext(); i++ ) {
FlatNode nn = fn.getNext( i );
private void computeStalls_nodeActions( FlatNode fn,
VarSrcTokTable vstTable,
FlatSESEEnterNode currentSESE ) {
+ String s = "no op";
+
switch( fn.kind() ) {
case FKind.FlatSESEEnterNode: {
} break;
default: {
- String s = "no op";
-
Set<VariableSourceToken> stallSet = vstTable.getStallSet( currentSESE );
if( !stallSet.isEmpty() ) {
- s = "stall for:";
+ s = "STALL for:";
Iterator<VariableSourceToken> itr = stallSet.iterator();
while( itr.hasNext() ) {
s += " "+vst.getVarLive();
}
}
-
- codePlan.put( fn, s );
} break;
} // end switch
+
+ codePlan.put( fn, s );
}
}
Set<VariableSourceToken> bSet = get( new SVKey( b, vst.getVarLive() ) );\r
if( !bSet.isEmpty() ) {\r
remove( vst );\r
+\r
+ // mark this variable as a virtual read as well\r
}\r
}\r
}\r
\r
\r
- public Set<VariableSourceToken> getStallSet( FlatSESEEnterNode curr ) {\r
+ public Set<VariableSourceToken> getStallSet( FlatSESEEnterNode curr/*,\r
+ TempDescriptor varLive*/ ) {\r
\r
Set<VariableSourceToken> out = new HashSet<VariableSourceToken>();\r
\r
Iterator<FlatSESEEnterNode> cItr = curr.getChildren().iterator();\r
while( cItr.hasNext() ) {\r
FlatSESEEnterNode child = cItr.next();\r
+ //out.addAll( get( new SVKey( child, varLive ) ) );\r
out.addAll( get( child ) );\r
}\r
\r