From e39a8fe0b0ac844cadf3c632670b7c6d2c6fa27b Mon Sep 17 00:00:00 2001 From: yeom Date: Mon, 28 Mar 2011 02:12:53 +0000 Subject: [PATCH] bug fix on RBlockRelationAnalysis: found that status changes of potential stall site is not propagated properly. now, OoOJava works fine with Power benchmark. --- .../OoOJava/RBlockRelationAnalysis.java | 71 +++++++++++++++---- 1 file changed, 56 insertions(+), 15 deletions(-) diff --git a/Robust/src/Analysis/OoOJava/RBlockRelationAnalysis.java b/Robust/src/Analysis/OoOJava/RBlockRelationAnalysis.java index 080203c4..7e511008 100644 --- a/Robust/src/Analysis/OoOJava/RBlockRelationAnalysis.java +++ b/Robust/src/Analysis/OoOJava/RBlockRelationAnalysis.java @@ -243,7 +243,7 @@ public class RBlockRelationAnalysis { // Uncomment this phase to debug the marking of potential // stall sites for parents between/after children tasks. // After this debug thing runs in calls System.exit() - //debugPrintPotentialStallSites( descriptorsToAnalyze ); + // debugPrintPotentialStallSites( descriptorsToAnalyze ); } @@ -455,7 +455,7 @@ public class RBlockRelationAnalysis { for( int i = 0; i < fsen.numNext(); i++ ) { FlatNode nn = fsen.getNext( i ); flatNodesToVisit.put( nn, fsen.getfmEnclosing() ); - mergeIsPotentialStallSite( nn, false ); + //mergeIsPotentialStallSite( nn, false ); } Set visited = new HashSet(); @@ -468,7 +468,6 @@ public class RBlockRelationAnalysis { 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 // child, then from the child's exit propagate "true" for @@ -481,12 +480,16 @@ public class RBlockRelationAnalysis { if( fn instanceof FlatSESEEnterNode || fn instanceof FlatSESEExitNode ) { // fix it so this is never a potential stall site, but from - // a child definition onward propagate 'true' + // a child definition onward propagate 'true' -> eom's comment: not sure why we need to set isPotentialStallSite=ture setIsPotentialStallSite( fn, false ); + // isPotentialStallSite = true; + } + + if( fn instanceof FlatSESEExitNode ) { isPotentialStallSite = true; } - - + + if( fn == fsen.getFlatExit() ) { // don't enqueue any futher nodes when you find your exit, // NOR mark your own flat as a statement you are currently @@ -543,17 +546,55 @@ public class RBlockRelationAnalysis { // flat nodes that flow in the current method context } - // otherwise keep visiting nodes in same context - for( int i = 0; i < fn.numNext(); i++ ) { - FlatNode nn = fn.getNext( i ); - - if( !visited.contains( nn ) ) { - flatNodesToVisit.put( nn, fm ); - - // propagate your IR graph predecessor's stall site potential - mergeIsPotentialStallSite( nn, isPotentialStallSite ); + // 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