From f5ff95066a79d304d6a39635da0a629e4d3efbad Mon Sep 17 00:00:00 2001 From: jjenista Date: Mon, 10 Jan 2011 23:31:49 +0000 Subject: [PATCH] just a little change to keep genreach debug node from getting wiped out during optimization --- .../Analysis/Disjoint/DisjointAnalysis.java | 18 ++++++++++++------ Robust/src/Analysis/Loops/DeadCode.java | 1 + .../src/Analysis/OoOJava/OoOJavaAnalysis.java | 3 +-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Robust/src/Analysis/Disjoint/DisjointAnalysis.java b/Robust/src/Analysis/Disjoint/DisjointAnalysis.java index c2139b22..d0a32ebd 100644 --- a/Robust/src/Analysis/Disjoint/DisjointAnalysis.java +++ b/Robust/src/Analysis/Disjoint/DisjointAnalysis.java @@ -1111,8 +1111,10 @@ public class DisjointAnalysis { switch( fn.kind() ) { case FKind.FlatGenReachNode: { + FlatGenReachNode fgrn = (FlatGenReachNode) fn; + System.out.println( "Generating a reach graph!" ); - rg.writeGraph( "genReach"+d, + rg.writeGraph( "genReach"+fgrn.getGraphName(), true, // write labels (variables) true, // selectively hide intermediate temp vars true, // prune unreachable heap regions @@ -1606,14 +1608,18 @@ public class DisjointAnalysis { // callee analysis, finish this transformation rg = rgMergeOfPossibleCallers; + + // jjenista: what is this? It breaks compilation + // of programs with no tasks/SESEs/rblocks... //XXXXXXXXXXXXXXXXXXXXXXXXX //need to consider more FlatNode nextFN=fmCallee.getNext(0); - assert nextFN instanceof FlatSESEEnterNode; - FlatSESEEnterNode calleeSESE=(FlatSESEEnterNode)nextFN; - if(!calleeSESE.getIsLeafSESE()){ - rg.makeInaccessible( liveness.getLiveInTemps( fmContaining, fn ) ); - } + if( nextFN instanceof FlatSESEEnterNode ) { + FlatSESEEnterNode calleeSESE=(FlatSESEEnterNode)nextFN; + if(!calleeSESE.getIsLeafSESE()){ + rg.makeInaccessible( liveness.getLiveInTemps( fmContaining, fn ) ); + } + } } break; diff --git a/Robust/src/Analysis/Loops/DeadCode.java b/Robust/src/Analysis/Loops/DeadCode.java index d624fdd4..eea7adbb 100644 --- a/Robust/src/Analysis/Loops/DeadCode.java +++ b/Robust/src/Analysis/Loops/DeadCode.java @@ -37,6 +37,7 @@ public class DeadCode { case FKind.FlatPrefetchNode: case FKind.FlatSESEEnterNode: case FKind.FlatSESEExitNode: + case FKind.FlatGenReachNode: if (!useful.contains(fn)) { useful.add(fn); changed=true; diff --git a/Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java b/Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java index f0fd9518..b54714b6 100644 --- a/Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java +++ b/Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java @@ -229,8 +229,7 @@ public class OoOJavaAnalysis { // 9th pass, ask disjoint analysis to compute reachability // for objects that may cause heap conflicts so the most // efficient method to deal with conflict can be computed - // later - + // later disjointAnalysisReach = new DisjointAnalysis(state, typeUtil, callGraph, liveness, arrayReferencees, sitesToFlag, null, // don't do effects analysis again! -- 2.34.1