From 7c34183a88a0722dbd865db461fc400314214bfb Mon Sep 17 00:00:00 2001 From: bdemsky Date: Wed, 1 Jul 2009 07:05:52 +0000 Subject: [PATCH] change --- .../Analysis/Locality/DelayComputation.java | 32 ++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/Robust/src/Analysis/Locality/DelayComputation.java b/Robust/src/Analysis/Locality/DelayComputation.java index 964e6d52..09ecce0e 100644 --- a/Robust/src/Analysis/Locality/DelayComputation.java +++ b/Robust/src/Analysis/Locality/DelayComputation.java @@ -265,6 +265,11 @@ public class DelayComputation { HashSet unionset=new HashSet(delayedset); Hashtable>> map=new Hashtable>>(); HashSet livenodes=new HashSet(); + Hashtable> branchmap=revGetBranchSet(lb); + + //Here we check for temps that are live out on the transaction... + //If both parts can contribute to the temp, then we need to do + //reads to make sure that liveout set has the right values for(Iterator fnit=fm.getNodeSet().iterator();fnit.hasNext();) { FlatNode fn=fnit.next(); @@ -295,8 +300,9 @@ public class DelayComputation { if (inpart1&&inpart2) { for(Iterator fnit2=fnset.iterator();fnit2.hasNext();) { FlatNode fn2=fnit2.next(); - if (otherset.contains(fn2)||cannotdelayset.contains(fn2)) { + if (otherset.contains(fn2)||cannotdelayset.contains(fn2)) { unionset.add(fn2); + System.out.println("ADDA"+fn2); livenodes.add(fn2); } } @@ -338,16 +344,17 @@ public class DelayComputation { } if (delayedset.contains(fn)) { - //Check our readset + //If the node is in the second set, check our readset TempDescriptor readset[]=fn.readsTemps(); for(int i=0;i1) { - //We have a conditional branch...need to handle this carefully - Set set0=getNext(fn, 0, unionset, lb, locality, false); - Set set1=getNext(fn, 1, unionset, lb, locality, false); - if (!set0.equals(set1)||set0.size()>1) { - //This branch is important--need to remember how it goes - livenodes.add(fn); - unionset.add(fn); + Set branchset=branchmap.get((FlatCondBranch)fn); + for(Iterator brit=branchset.iterator();brit.hasNext();) { + FlatNode brfn=brit.next(); + if (unionset.contains(brfn)) { + //This branch is important--need to remember how it goes + System.out.println("ADDC"+fn); + livenodes.add(fn); + unionset.add(fn); + } } } } -- 2.34.1