From: yeom Date: Fri, 9 Jul 2010 18:00:46 +0000 (+0000) Subject: bug fix: prevent generating unnecessaary waiting queues for main method. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c6fc516e25da24f7f1b7285dd575b6b5fdae8fda;p=IRC.git bug fix: prevent generating unnecessaary waiting queues for main method. --- diff --git a/Robust/src/IR/Flat/BuildCode.java b/Robust/src/IR/Flat/BuildCode.java index 887f0ee6..3b6c8a85 100644 --- a/Robust/src/IR/Flat/BuildCode.java +++ b/Robust/src/IR/Flat/BuildCode.java @@ -1833,30 +1833,31 @@ public class BuildCode { } }else{ FlatSESEEnterNode callerSESEplaceholder = (FlatSESEEnterNode) fm.getNext( 0 ); - Analysis.OoOJava.ConflictGraph graph = oooa.getConflictGraph(callerSESEplaceholder); - if (graph != null && graph.hasConflictEdge()) { - output.println(" /* set up waiting queues */"); - output.println(" int numMemoryQueue=0;"); - output.println(" int memoryQueueItemID=0;"); - Set lockSet = oooa.getLockMappings(graph); - System.out.println("#lockSet="+lockSet.hashCode()); - System.out.println("lockset="+lockSet); - for (Iterator iterator = lockSet.iterator(); iterator.hasNext();) { - Analysis.OoOJava.SESELock seseLock = (Analysis.OoOJava.SESELock) iterator.next(); - System.out.println("id="+seseLock.getID()); - System.out.println("#="+seseLock); - } - System.out.println("size="+lockSet.size()); - if (lockSet.size() > 0) { - output.println(" numMemoryQueue=" + lockSet.size() + ";"); - output - .println(" seseCaller->numMemoryQueue=numMemoryQueue;"); - output - .println(" seseCaller->memoryQueueArray=mlpCreateMemoryQueueArray(numMemoryQueue);"); - output.println(); + if(callerSESEplaceholder!= oooa.getMainSESE()){ + Analysis.OoOJava.ConflictGraph graph = oooa.getConflictGraph(callerSESEplaceholder); + if (graph != null && graph.hasConflictEdge()) { + output.println(" // set up waiting queues "); + output.println(" int numMemoryQueue=0;"); + output.println(" int memoryQueueItemID=0;"); + Set lockSet = oooa.getLockMappings(graph); + System.out.println("#lockSet="+lockSet.hashCode()); + System.out.println("lockset="+lockSet); + for (Iterator iterator = lockSet.iterator(); iterator.hasNext();) { + Analysis.OoOJava.SESELock seseLock = (Analysis.OoOJava.SESELock) iterator.next(); + System.out.println("id="+seseLock.getID()); + System.out.println("#="+seseLock); + } + System.out.println("size="+lockSet.size()); + if (lockSet.size() > 0) { + output.println(" numMemoryQueue=" + lockSet.size() + ";"); + output + .println(" seseCaller->numMemoryQueue=numMemoryQueue;"); + output + .println(" seseCaller->memoryQueueArray=mlpCreateMemoryQueueArray(numMemoryQueue);"); + output.println(); + } } } - } } @@ -2199,7 +2200,7 @@ public class BuildCode { System.out.println("#lockSet="+lockSet); if (lockSet.size() > 0) { - output.println(" numMemoryQueue=" + lockSet.size() + ";"); + output.println(" numMemoryQueue=" + lockSet.size() + "; "); output .println(" parentCommon->numMemoryQueue=numMemoryQueue;"); output