From 070ad0269f640ccabb3ca429186f19f39b35c239 Mon Sep 17 00:00:00 2001 From: jjenista Date: Tue, 28 Apr 2009 23:01:35 +0000 Subject: [PATCH] Something is wrong with liveness results that want to prune away everything during stall computations, this stable capture shows all vars needed without liveness --- Robust/src/Analysis/MLP/MLPAnalysis.java | 18 +++++++++++++----- Robust/src/Analysis/MLP/VarSrcTokTable.java | 4 +--- Robust/src/Tests/mlp/tinyTest/test.java | 6 +++--- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Robust/src/Analysis/MLP/MLPAnalysis.java b/Robust/src/Analysis/MLP/MLPAnalysis.java index 7742b76c..8f2208d4 100644 --- a/Robust/src/Analysis/MLP/MLPAnalysis.java +++ b/Robust/src/Analysis/MLP/MLPAnalysis.java @@ -504,18 +504,26 @@ public class MLPAnalysis { default: { Set stallSet = vstTable.getStallSet( currentSESE ); - if( !stallSet.isEmpty() ) { + + /* + Set liveIn = livenessResults.get( fn ); + + if( liveIn != null ) { + stallSet.retainAll( liveIn ); + } else { + // there is nothing live, clear all + stallSet.clear(); + } + */ + if( !stallSet.isEmpty() ) { s = "STALL for:"; - Iterator itr = stallSet.iterator(); while( itr.hasNext() ) { VariableSourceToken vst = itr.next(); s += " "+vst.getVarLive(); } - } - - + } } break; } // end switch diff --git a/Robust/src/Analysis/MLP/VarSrcTokTable.java b/Robust/src/Analysis/MLP/VarSrcTokTable.java index 9a4bb655..b71d2805 100644 --- a/Robust/src/Analysis/MLP/VarSrcTokTable.java +++ b/Robust/src/Analysis/MLP/VarSrcTokTable.java @@ -424,15 +424,13 @@ public class VarSrcTokTable { } - public Set getStallSet( FlatSESEEnterNode curr/*, TempDescriptor varLive*/ ) { - + public Set getStallSet( FlatSESEEnterNode curr ) { Set out = new HashSet(); Iterator cItr = curr.getChildren().iterator(); while( cItr.hasNext() ) { FlatSESEEnterNode child = cItr.next(); - //out.addAll( get( new SVKey( child, varLive ) ) ); out.addAll( get( child ) ); } diff --git a/Robust/src/Tests/mlp/tinyTest/test.java b/Robust/src/Tests/mlp/tinyTest/test.java index ebe0a08e..e29ea038 100644 --- a/Robust/src/Tests/mlp/tinyTest/test.java +++ b/Robust/src/Tests/mlp/tinyTest/test.java @@ -22,9 +22,9 @@ public class Test { int x = 1; sese fi { - if( true ) { - x = 2; - } + //if( true ) { + x = 2; + //} } x = x + 1; -- 2.34.1