From 1b559c9ad450425bd72169f531b39f4a11749c88 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Mon, 28 Mar 2011 06:13:18 +0000 Subject: [PATCH] changes... --- .../OoOJava/RBlockRelationAnalysis.java | 80 ++++++------------- 1 file changed, 25 insertions(+), 55 deletions(-) diff --git a/Robust/src/Analysis/OoOJava/RBlockRelationAnalysis.java b/Robust/src/Analysis/OoOJava/RBlockRelationAnalysis.java index 4267665b..3f470ce0 100644 --- a/Robust/src/Analysis/OoOJava/RBlockRelationAnalysis.java +++ b/Robust/src/Analysis/OoOJava/RBlockRelationAnalysis.java @@ -455,7 +455,6 @@ public class RBlockRelationAnalysis { for( int i = 0; i < fsen.numNext(); i++ ) { FlatNode nn = fsen.getNext( i ); flatNodesToVisit.put( nn, fsen.getfmEnclosing() ); - //mergeIsPotentialStallSite( nn, false ); } Set visited = new HashSet(); @@ -466,6 +465,7 @@ public class RBlockRelationAnalysis { FlatMethod fm = (FlatMethod) me.getValue(); flatNodesToVisit.remove( fn ); + visited.add( fn ); // the "is potential stall site" strategy is to propagate // "false" from the beginning of a task until you hit a @@ -484,6 +484,7 @@ public class RBlockRelationAnalysis { } if( fn instanceof FlatSESEExitNode ) { + setIsPotentialStallSite( fn, false ); isPotentialStallSite = true; } @@ -509,6 +510,11 @@ public class RBlockRelationAnalysis { continue; } + + // if previous flat nodes have any changes,, + // propagate predecessor's status of stall site potential + + if( fn instanceof FlatCall ) { // start visiting nodes in other contexts FlatCall fc = (FlatCall) fn; @@ -526,66 +532,30 @@ public class RBlockRelationAnalysis { for( Iterator imps = implementations.iterator(); imps.hasNext(); ) { MethodDescriptor mdImp = (MethodDescriptor) imps.next(); FlatMethod fmImp = state.getMethodFlat( mdImp ); - flatNodesToVisit.put( fmImp, fmImp ); - - // propagate your IR graph predecessor's stall site potential - mergeIsPotentialStallSite( fmImp, isPotentialStallSite ); + if ((isPotentialStallSite&&!isPotentialStallSite(fmImp))|| + !visited.contains(fmImp)) { + flatNodesToVisit.put( fmImp, fmImp ); + + // propagate your IR graph predecessor's stall site potential + mergeIsPotentialStallSite( fmImp, isPotentialStallSite ); + } } // don't 'continue' out of this loop, also enqueue // flat nodes that flow in the current method context } - - // if previous flat nodes have any changes,, - // propagate predecessor's status of stall site potential - boolean hasChanges=false; - boolean isPrevPossibleStallSite=false; - for(int i=0;i