From: bdemsky Date: Tue, 25 May 2010 22:11:03 +0000 (+0000) Subject: real fix for the bug...not just the symptom X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ed937853724ec72b505c68c975f25ec14a1d7f47;p=IRC.git real fix for the bug...not just the symptom --- diff --git a/Robust/src/Analysis/Locality/GenerateConversions.java b/Robust/src/Analysis/Locality/GenerateConversions.java index 00c9dd78..34fa9428 100644 --- a/Robust/src/Analysis/Locality/GenerateConversions.java +++ b/Robust/src/Analysis/Locality/GenerateConversions.java @@ -145,9 +145,15 @@ public class GenerateConversions { for(Iterator tempit=tempset.iterator(); tempit.hasNext();) { TempDescriptor tmpd=tempit.next(); FlatGlobalConvNode fgcn=new FlatGlobalConvNode(tmpd, lb, false, nodetoconvs.get(fn).contains(tmpd)); + + //This loop makes sure that we have accurate atomic information for the new node + for(Iterator lbit=locality.getMethodBindings(lb.getMethod()).iterator();lbit.hasNext();) { + LocalityBinding fixlb=lbit.next(); + locality.getAtomic(fixlb).put(fgcn, locality.getAtomic(fixlb).get(fn.getPrev(0))); + locality.getNodeTempInfo(fixlb).put(fgcn, (Hashtable)locality.getNodeTempInfo(fixlb).get(fn).clone()); + } + fgcn.setAtomicEnter(((FlatAtomicExitNode)fn).getAtomicEnter()); - atomictab.put(fgcn, new Integer(1)); - temptab.put(fgcn, (Hashtable)temptab.get(fn).clone()); FlatNode[] prevarray=new FlatNode[fn.numPrev()]; for(int i=0; i tempit=tempset.iterator(); tempit.hasNext();) { FlatGlobalConvNode fgcn=new FlatGlobalConvNode(tempit.next(), lb, true); fgcn.setAtomicEnter((FlatAtomicEnterNode)fn); - atomictab.put(fgcn, atomictab.get(fn)); - temptab.put(fgcn, (Hashtable)temptab.get(fn).clone()); + //This loop makes sure that we have accurate atomic information for the new node + for(Iterator lbit=locality.getMethodBindings(lb.getMethod()).iterator();lbit.hasNext();) { + LocalityBinding fixlb=lbit.next(); + locality.getAtomic(fixlb).put(fgcn, locality.getAtomic(fixlb).get(fn)); + locality.getNodeTempInfo(fixlb).put(fgcn, (Hashtable)locality.getNodeTempInfo(fixlb).get(fn).clone()); + } fgcn.addNext(fn.getNext(0)); fn.setNext(0, fgcn); } diff --git a/Robust/src/Analysis/Locality/LocalityAnalysis.java b/Robust/src/Analysis/Locality/LocalityAnalysis.java index 265fce75..7dac0609 100644 --- a/Robust/src/Analysis/Locality/LocalityAnalysis.java +++ b/Robust/src/Analysis/Locality/LocalityAnalysis.java @@ -1209,6 +1209,7 @@ public class LocalityAnalysis { private void computeTempstoSave(LocalityBinding lb) { if (lb.isAtomic()) return; + System.out.println(lb); Hashtable atomictab=getAtomic(lb); Hashtable> temptab=getNodeTempInfo(lb); MethodDescriptor md=lb.getMethod(); @@ -1227,7 +1228,7 @@ public class LocalityAnalysis { boolean isatomic=atomictab.get(fn).intValue()>0; if (isatomic&& atomictab.get(fn.getPrev(0)).intValue()==0) { - assert(fn.getPrev(0).kind()==FKind.FlatAtomicEnterNode); + assert(fn.kind()==FKind.FlatAtomicEnterNode); nodemap.put(fn, (FlatAtomicEnterNode)fn); nodetosavetemps.put((FlatAtomicEnterNode)fn, new HashSet()); } else if (isatomic) { diff --git a/Robust/src/Analysis/Loops/WriteBarrier.java b/Robust/src/Analysis/Loops/WriteBarrier.java index 4dbd5149..144674ae 100644 --- a/Robust/src/Analysis/Loops/WriteBarrier.java +++ b/Robust/src/Analysis/Loops/WriteBarrier.java @@ -111,9 +111,6 @@ public class WriteBarrier { nb.add(fnew.getDst()); break; } - case FKind.FlatGlobalConvNode: - //These nodes don't have atomic information for all localities...just skip them - break; default: //If we enter a transaction toss everything if (atomic.get(fn).intValue()>0&&