Descriptor md = (Descriptor) tovisit.iterator().next();
tovisit.remove(md);
Set s = (Set) mapCaller2CalleeSet.get(md);
+
if (s != null) {
for (Iterator it = s.iterator(); it.hasNext();) {
MethodDescriptor md2 = (MethodDescriptor) it.next();
}
}
}
- callable.retainAll(methodsContainingSESEs);
+// callable.retainAll(methodsContainingSESEs);
return callable;
}
// before transfer func, possibly inject
// stall-site taint
if( doEffectsAnalysis && fmContaining != fmAnalysisEntry ) {
-
if(rblockStatus.isInCriticalRegion(fmContaining, fn)){
// x=y.f, stall y if not accessible
// contributes read effects on stall site of y
}
-
+
boolean debugCallSite =
mdCaller.getSymbol().equals( state.DISJOINTDEBUGCALLER ) &&
mdCallee.getSymbol().equals( state.DISJOINTDEBUGCALLEE );
// now that we've taken care of building heap models for
// callee analysis, finish this transformation
rg = rgMergeOfPossibleCallers;
+
+ //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 ) );
+ }
+
} break;
// 7th pass, make conflict graph
// conflict graph is maintained by each parent sese,
+
+ Set<FlatSESEEnterNode> allSESEs=rblockRel.getAllSESEs();
+ for (Iterator iterator = allSESEs.iterator(); iterator.hasNext();) {
+
+ FlatSESEEnterNode parent = (FlatSESEEnterNode) iterator.next();
+ if (!parent.getIsLeafSESE()) {
+
+ EffectsAnalysis effectsAnalysis = disjointAnalysisTaints.getEffectsAnalysis();
+ ConflictGraph conflictGraph = sese2conflictGraph.get(parent);
+ if (conflictGraph == null) {
+ conflictGraph = new ConflictGraph(state);
+ }
+
+ Set<FlatSESEEnterNode> children = parent.getSESEChildren();
+ for (Iterator iterator2 = children.iterator(); iterator2.hasNext();) {
+ FlatSESEEnterNode child = (FlatSESEEnterNode) iterator2.next();
+ Hashtable<Taint, Set<Effect>> taint2Effects = effectsAnalysis.get(child);
+ conflictGraph.addLiveIn(taint2Effects);
+ if(taint2Effects!=null)
+ System.out.println("#add ="+taint2Effects+"currentSESE="+child+" into conflictGraph="+conflictGraph);
+
+ sese2conflictGraph.put(parent, conflictGraph);
+ }
+ }
+ }
+
Iterator descItr = disjointAnalysisTaints.getDescriptorsToAnalyze().iterator();
while (descItr.hasNext()) {
Descriptor d = (Descriptor) descItr.next();
FlatMethod fm = state.getMethodFlat(d);
if (fm != null)
makeConflictGraph(fm);
- }
+ }
+
+
// debug routine
/*
}
}
+
private void writeFile(Set<FlatNew> sitesToFlag) {
assert seseStack != null;
if (!seseStack.isEmpty()) {
-
- ConflictGraph conflictGraph = sese2conflictGraph.get(seseStack.peek());
- if (conflictGraph == null) {
- conflictGraph = new ConflictGraph(state);
- }
-
conflictGraph_nodeAction(fn, seseStack.peek());
}
ConflictGraph conflictGraph;
TempDescriptor lhs;
TempDescriptor rhs;
-
+
EffectsAnalysis effectsAnalysis = disjointAnalysisTaints.getEffectsAnalysis();
- switch (fn.kind()) {
-
- case FKind.FlatSESEEnterNode: {
-
- if (currentSESE.getParent() == null) {
- return;
- }
- conflictGraph = sese2conflictGraph.get(currentSESE.getParent());
- if (conflictGraph == null) {
- conflictGraph = new ConflictGraph(state);
- }
-
- FlatSESEEnterNode fsen = (FlatSESEEnterNode) fn;
+// System.out.println("current="+currentSESE.getmdEnclosing()+" PARENT=" + currentSESE.getSESEParent());
- if (!fsen.getIsCallerSESEplaceholder() && currentSESE.getParent() != null) {
- // collects effects set of invar set and generates invar node
- Hashtable<Taint, Set<Effect>> taint2Effects = effectsAnalysis.get(currentSESE);
- conflictGraph.addLiveIn(taint2Effects);
- }
-
- if (conflictGraph.id2cn.size() > 0) {
- sese2conflictGraph.put(currentSESE.getParent(), conflictGraph);
- }
-
- }
- break;
+ switch (fn.kind()) {
case FKind.FlatFieldNode:
case FKind.FlatElementNode: {
- conflictGraph = sese2conflictGraph.get(currentSESE);
- if (conflictGraph == null) {
- conflictGraph = new ConflictGraph(state);
- }
+ // conflictGraph = sese2conflictGraph.get(currentSESE);
+ // if (conflictGraph == null) {
+ // conflictGraph = new ConflictGraph(state);
+ // }
if (fn instanceof FlatFieldNode) {
FlatFieldNode ffn = (FlatFieldNode) fn;
} else {
FlatElementNode fen = (FlatElementNode) fn;
rhs = fen.getSrc();
- }
+ }
- // add stall site
- Hashtable<Taint, Set<Effect>> taint2Effects = effectsAnalysis.get(fn);
- conflictGraph.addStallSite(taint2Effects, rhs);
+ Set<FlatSESEEnterNode> parentSet = currentSESE.getSESEParent();
+ for (Iterator iterator = parentSet.iterator(); iterator.hasNext();) {
+ FlatSESEEnterNode parent = (FlatSESEEnterNode) iterator.next();
+// System.out.println("##current="+currentSESE.getmdEnclosing()+" PARENT=" + parent);
+ conflictGraph = sese2conflictGraph.get(parent);
+ if (conflictGraph == null) {
+ conflictGraph = new ConflictGraph(state);
+ }
- if (conflictGraph.id2cn.size() > 0) {
- sese2conflictGraph.put(currentSESE, conflictGraph);
+ // add stall site
+ Hashtable<Taint, Set<Effect>> taint2Effects = effectsAnalysis.get(fn);
+ conflictGraph.addStallSite(taint2Effects, rhs);
+ if (taint2Effects != null)
+// System.out.println("add =" + taint2Effects + "currentSESE=" + parent
+// + " into conflictGraph=" + conflictGraph);
+
+ if (conflictGraph.id2cn.size() > 0) {
+ sese2conflictGraph.put(parent, conflictGraph);
+ }
}
+
}
break;
case FKind.FlatSetFieldNode:
case FKind.FlatSetElementNode: {
- conflictGraph = sese2conflictGraph.get(currentSESE);
- if (conflictGraph == null) {
- conflictGraph = new ConflictGraph(state);
- }
-
if (fn instanceof FlatSetFieldNode) {
FlatSetFieldNode fsfn = (FlatSetFieldNode) fn;
lhs = fsfn.getDst();
}
// collects effects of stall site and generates stall site node
- Hashtable<Taint, Set<Effect>> taint2Effects = effectsAnalysis.get(fn);
- conflictGraph.addStallSite(taint2Effects, rhs);
- conflictGraph.addStallSite(taint2Effects, lhs);
+ Set<FlatSESEEnterNode> parentSet = currentSESE.getSESEParent();
+ for (Iterator iterator = parentSet.iterator(); iterator.hasNext();) {
+ FlatSESEEnterNode parent = (FlatSESEEnterNode) iterator.next();
+ conflictGraph = sese2conflictGraph.get(parent);
+ if (conflictGraph == null) {
+ conflictGraph = new ConflictGraph(state);
+ }
- if (conflictGraph.id2cn.size() > 0) {
- sese2conflictGraph.put(currentSESE, conflictGraph);
+ Hashtable<Taint, Set<Effect>> taint2Effects = effectsAnalysis.get(fn);
+ conflictGraph.addStallSite(taint2Effects, rhs);
+ conflictGraph.addStallSite(taint2Effects, lhs);
+
+ if (conflictGraph.id2cn.size() > 0) {
+ sese2conflictGraph.put(parent, conflictGraph);
+ }
}
+
}
break;
// collects effects of stall site and generates stall site node
Hashtable<Taint, Set<Effect>> taint2Effects = effectsAnalysis.get(fn);
- conflictGraph.addStallSite(taint2Effects, lhs);
- if (conflictGraph.id2cn.size() > 0) {
- sese2conflictGraph.put(currentSESE, conflictGraph);
+
+ Set<FlatSESEEnterNode> parentSet = currentSESE.getSESEParent();
+ for (Iterator iterator = parentSet.iterator(); iterator.hasNext();) {
+ FlatSESEEnterNode parent = (FlatSESEEnterNode) iterator.next();
+ conflictGraph = sese2conflictGraph.get(parent);
+ if (conflictGraph == null) {
+ conflictGraph = new ConflictGraph(state);
+ }
+
+ conflictGraph.addStallSite(taint2Effects, lhs);
+ if (conflictGraph.id2cn.size() > 0) {
+ sese2conflictGraph.put(parent, conflictGraph);
+ }
+
}
+
}
break;
while (seseIter.hasNext()) {
FlatSESEEnterNode sese = (FlatSESEEnterNode) seseIter.next();
ConflictGraph conflictGraph = sese2conflictGraph.get(sese);
+// System.out.println("# CALCULATING SESE CONFLICT="+sese);
if (useReachInfo) {
// clear current conflict before recalculating with reachability info
conflictGraph.clearAllConflictEdge();
// simply a set of every reachable SESE in the program, not
// including caller placeholder SESEs
protected Set<FlatSESEEnterNode> allSESEs;
+
+ // a set of every bogus palceholder SESEs
+ protected Set<FlatSESEEnterNode> allBogusSESEs;
// per method-per node-rblock stacks
protected Hashtable< FlatMethod,
rootSESEs = new HashSet<FlatSESEEnterNode>();
allSESEs = new HashSet<FlatSESEEnterNode>();
+ allBogusSESEs = new HashSet<FlatSESEEnterNode>();
methodsContainingSESEs = new HashSet<MethodDescriptor>();
if( !fsen.getIsCallerSESEplaceholder() ) {
allSESEs.add( fsen );
methodsContainingSESEs.add( fm.getMethod() );
+ }else{
+ allBogusSESEs.add(fsen);
}
fsen.setfmEnclosing( fm );
protected void computeLeafSESEs() {
- for( Iterator<FlatSESEEnterNode> itr = allSESEs.iterator();
- itr.hasNext();
- ) {
+
+ Set<FlatSESEEnterNode> all=new HashSet<FlatSESEEnterNode>();
+ all.addAll(allSESEs);
+ all.addAll(allBogusSESEs);
+
+ for (Iterator<FlatSESEEnterNode> itr = all.iterator(); itr.hasNext();) {
FlatSESEEnterNode fsen = itr.next();
boolean hasNoNestedChildren = fsen.getChildren().isEmpty();
- boolean hasNoChildrenByCall = !hasChildrenByCall( fsen );
+ boolean hasNoChildrenByCall = !hasChildrenByCall(fsen);
- fsen.setIsLeafSESE( hasNoNestedChildren &&
- hasNoChildrenByCall );
+ fsen.setIsLeafSESE(hasNoNestedChildren && hasNoChildrenByCall);
}
+
+ // for( Iterator<FlatSESEEnterNode> itr = allSESEs.iterator();
+ // itr.hasNext();
+ // ) {
+ // FlatSESEEnterNode fsen = itr.next();
+ //
+ // boolean hasNoNestedChildren = fsen.getChildren().isEmpty();
+ // boolean hasNoChildrenByCall = !hasChildrenByCall( fsen );
+ //
+ // fsen.setIsLeafSESE( hasNoNestedChildren &&
+ // hasNoChildrenByCall );
+ // }
}
if (!reachable.isEmpty()) {
hasChildrenByCall = true;
- Set reachableSESEMethodSet =
- callGraph.getFirstReachableMethodContainingSESE(mdCallee, methodsContainingSESEs);
+ if (!fsen.getIsCallerSESEplaceholder()) {
+ // System.out.println("%%%mdCallee="+mdCallee+" from fsen="+fsen);
+ Set reachableSESEMethodSet =
+ callGraph.getFirstReachableMethodContainingSESE(mdCallee, methodsContainingSESEs);
- if (methodsContainingSESEs.contains(mdCallee)) {
+ // if (methodsContainingSESEs.contains(mdCallee)) {
reachableSESEMethodSet.add(mdCallee);
- }
+ // }
+
+ // System.out.println("#");
+ // System.out.println("fsen"+fsen);
+ // System.out.println("reachableSESEMethodSet="+reachableSESEMethodSet);
+
+ for (Iterator iterator = reachableSESEMethodSet.iterator(); iterator.hasNext();) {
+ MethodDescriptor md = (MethodDescriptor) iterator.next();
+ // Set<FlatSESEEnterNode> seseSet = md2seseSet.get(md);
+ FlatMethod fm = state.getMethodFlat(md);
+ FlatSESEEnterNode fsenBogus = (FlatSESEEnterNode) fm.getNext(0);
+ fsenBogus.addSESEParent(fsen);
+ // System.out.println("% "+fm+"->"+fsen);
+ }
- for (Iterator iterator = reachableSESEMethodSet.iterator(); iterator.hasNext();) {
- MethodDescriptor md = (MethodDescriptor) iterator.next();
- Set<FlatSESEEnterNode> seseSet = md2seseSet.get(md);
- if (seseSet != null) {
- fsen.addSESEChildren(seseSet);
+ reachableSESEMethodSet.retainAll(methodsContainingSESEs);
+
+ for (Iterator iterator = reachableSESEMethodSet.iterator(); iterator.hasNext();) {
+ MethodDescriptor md = (MethodDescriptor) iterator.next();
+ Set<FlatSESEEnterNode> seseSet = md2seseSet.get(md);
+ if (seseSet != null) {
+ fsen.addSESEChildren(seseSet);
+ for (Iterator iterator2 = seseSet.iterator(); iterator2.hasNext();) {
+ FlatSESEEnterNode child = (FlatSESEEnterNode) iterator2.next();
+ child.addSESEParent(fsen);
+ }
+ }
}
- }
+ }
}
+
}
if (fn == fsen.getFlatExit()) {
import java.util.LinkedList;
import java.util.Set;
import java.util.Stack;
+import java.util.TreeSet;
import java.util.Map.Entry;
import Analysis.CallGraph.CallGraph;
+import Analysis.Disjoint.ReachGraph;
+import IR.Descriptor;
import IR.MethodDescriptor;
import IR.State;
+import IR.TypeDescriptor;
import IR.TypeUtil;
import IR.Flat.FKind;
+import IR.Flat.FlatCall;
import IR.Flat.FlatMethod;
import IR.Flat.FlatNode;
import IR.Flat.FlatSESEEnterNode;
analyzeMethods(descriptorsToAnalyze);
- // analyzeMethodsDebug(descriptorsToAnalyze);
+ //analyzeMethodsDebug(descriptorsToAnalyze);
}
protected void analyzeMethods(Set<MethodDescriptor> descriptorsToAnalyze) {
Hashtable<FlatNode, Hashtable<FlatSESEEnterNode, Boolean>> statusMap =
fm2statusmap.get(fmContaining);
Hashtable<FlatSESEEnterNode, Boolean> status = statusMap.get(fn);
-
+
if(status.get(seseContaining).booleanValue()==true){
- //System.out.println(fn+" is in the critical region in according to "+seseContaining);
+// System.out.println(fn+" is in the critical region in according to "+seseContaining);
}
return status.get(seseContaining).booleanValue();
}
}
break;
+
+ case FKind.FlatCall: {
+ Descriptor mdCaller = fm.getMethod();
+
+ FlatCall fc = (FlatCall) fn;
+ MethodDescriptor mdCallee = fc.getMethod();
+ FlatMethod fmCallee = state.getMethodFlat( mdCallee );
+
+ Set<MethodDescriptor> setPossibleCallees = new HashSet<MethodDescriptor>();
+
+ if (mdCallee.isStatic()) {
+ setPossibleCallees.add(mdCallee);
+ } else {
+ TypeDescriptor typeDesc = fc.getThis().getType();
+ setPossibleCallees.addAll(callGraph.getMethods(mdCallee, typeDesc));
+ }
+
+ Iterator<MethodDescriptor> mdItr = setPossibleCallees.iterator();
+ while( mdItr.hasNext() ) {
+ MethodDescriptor mdPossible = mdItr.next();
+ FlatMethod fmPossible = state.getMethodFlat( mdPossible );
+ }
+
+ boolean hasSESECallee=false;
+ for (Iterator iterator = setPossibleCallees.iterator(); iterator.hasNext();) {
+ MethodDescriptor md = (MethodDescriptor) iterator.next();
+ FlatMethod flatMethod = state.getMethodFlat(md);
+ FlatNode flatNode = flatMethod.getNext(0);
+ assert flatNode instanceof FlatSESEEnterNode;
+ FlatSESEEnterNode flatSESE = (FlatSESEEnterNode) flatNode;
+ hasSESECallee |= (!flatSESE.getIsLeafSESE());
+ }
+
+ Stack<FlatSESEEnterNode> seseStack = rra.getRBlockStacks(fm, fn);
+ if (!seseStack.isEmpty()) {
+ FlatSESEEnterNode currentParent = seseStack.peek();
+ if(!status.containsKey(currentParent)){
+// System.out.println("currentParent="+currentParent+" fm="+currentParent.getfmEnclosing()+" hasSESECallee="+hasSESECallee);
+ status.put(currentParent, new Boolean(hasSESECallee));
+ }else{
+ boolean currentParentStatus=status.get(currentParent).booleanValue();
+// System.out.println("currentParent="+currentParent+" fm="+currentParent.getfmEnclosing()+" hasSESECallee="+hasSESECallee+" currentParentStatus="+currentParentStatus);
+ status.put(currentParent, new Boolean(hasSESECallee|currentParentStatus));
+ }
+ }
+
+ } break;
default: {
if (!(fn instanceof FlatMethod)) {
// eom
// handling stall site
if (state.OOOJAVA) {
- Analysis.OoOJava.ConflictGraph graph = oooa.getConflictGraph(currentSESE);
+ // NEED TO FIX IT
+ // assumes that there is only one parent, but it is possible that
+ // currentSESE has more than one so we need to generate
+ // conditional case for each parent case
+ Analysis.OoOJava.ConflictGraph graph = null;
+ if(currentSESE.getSESEParent().size()>0){
+ graph = oooa.getConflictGraph(currentSESE.getSESEParent().iterator().next());
+ }
+// Analysis.OoOJava.ConflictGraph graph = oooa.getConflictGraph(currentSESE);
if(graph!=null){
Set<Analysis.OoOJava.SESELock> seseLockSet = oooa.getLockMappings(graph);
Set<Analysis.OoOJava.WaitingElement> waitingElementSet = graph.getStallSiteWaitingElementSet(fn, seseLockSet);
if(state.RCR) {
dispatchMEMRC(fm, lb, fsen, output);
} else if(state.OOOJAVA){
- FlatSESEEnterNode parent = fsen.getParent();
- Analysis.OoOJava.ConflictGraph graph = oooa.getConflictGraph(parent);
+ // NEED TO FIX IT
+ // assumes that there is only one parent, but it is possible that
+ // currentSESE has more than one so we need to generate
+ // conditional case for each parent case
+ assert fsen.getSESEParent().size()>0;
+ FlatSESEEnterNode parent = fsen.getSESEParent().iterator().next();
+ Analysis.OoOJava.ConflictGraph graph = oooa.getConflictGraph(parent);
if (graph != null && graph.hasConflictEdge()) {
Set<Analysis.OoOJava.SESELock> seseLockSet = oooa.getLockMappings(graph);
output.println();
}
void dispatchMEMRC(FlatMethod fm, LocalityBinding lb, FlatSESEEnterNode fsen, PrintWriter output) {
- FlatSESEEnterNode parent = fsen.getParent();
+ // NEED TO FIX IT
+ // assumes that there is only one parent, but it is possible that
+ // currentSESE has more than one so we need to generate
+ // conditional case for each parent case
+ assert fsen.getSESEParent().size()>0;
+ FlatSESEEnterNode parent = fsen.getSESEParent().iterator().next();
Analysis.OoOJava.ConflictGraph graph = oooa.getConflictGraph(parent);
if (graph != null && graph.hasConflictEdge()) {
Set<Analysis.OoOJava.SESELock> seseLockSet = oooa.getLockMappings(graph);
System.out.println(fm.getMethod()+"["+invars+"]");
Vector<Long> queuetovar=new Vector<Long>();
-
+
for(int i=0;i<invars.size();i++) {
TempDescriptor td=invars.get(i);
Set<Analysis.OoOJava.WaitingElement> weset=seseWaitingQueue.getWaitingElementSet(td);
numqueues++;
queueSet.add(queueID);
}
- }
- output.println(" seseToIssue->rcrRecords["+i+"].flag="+numqueues+";");
- output.println(" seseToIssue->rcrRecords["+i+"].index=0;");
- output.println(" seseToIssue->rcrRecords["+i+"].next=NULL;");
- output.println(" int dispCount"+i+"=0;");
-
- for (Iterator<Analysis.OoOJava.WaitingElement> wtit = weset.iterator(); wtit.hasNext();) {
- Analysis.OoOJava.WaitingElement waitingElement = wtit.next();
- int queueID = waitingElement.getQueueID();
- if (queueID >= queuetovar.size())
- queuetovar.setSize(queueID + 1);
- Long l = queuetovar.get(queueID);
- long val = (l != null) ? l.longValue() : 0;
- val = val | (1 << i);
- queuetovar.set(queueID, new Long(val));
- }
+ }
+ output.println(" seseToIssue->rcrRecords["+i+"].flag="+numqueues+";");
+ output.println(" seseToIssue->rcrRecords["+i+"].index=0;");
+ output.println(" seseToIssue->rcrRecords["+i+"].next=NULL;");
+ output.println(" int dispCount"+i+"=0;");
+
+ for (Iterator<Analysis.OoOJava.WaitingElement> wtit = weset.iterator(); wtit.hasNext();) {
+ Analysis.OoOJava.WaitingElement waitingElement = wtit.next();
+ int queueID = waitingElement.getQueueID();
+ if (queueID >= queuetovar.size())
+ queuetovar.setSize(queueID + 1);
+ Long l = queuetovar.get(queueID);
+ long val = (l != null) ? l.longValue() : 0;
+ val = val | (1 << i);
+ queuetovar.set(queueID, new Long(val));
+ }
}
HashSet generatedqueueentry=new HashSet();
// a set of sese located at the first in transitive call chain
// starting from the current sese
protected Set<FlatSESEEnterNode> seseChildren;
+
+ // a set of complete parent sese, not bogus one
+ protected Set<FlatSESEEnterNode> seseParent;
+
public FlatSESEEnterNode( SESENode sn ) {
this.id = identifier++;
dynamicInVars = new HashSet<TempDescriptor>();
dynamicVars = new HashSet<TempDescriptor>();
seseChildren = new HashSet<FlatSESEEnterNode>();
+ seseParent = new HashSet<FlatSESEEnterNode>();
inVarsForDynamicCoarseConflictResolution = new Vector<TempDescriptor>();
}
public void addSESEChildren(Set<FlatSESEEnterNode> children){
+
seseChildren.addAll(children);
}
return isLeafSESE == ISLEAF_TRUE;
}
+
+ public Set<FlatSESEEnterNode> getSESEParent() {
+ return seseParent;
+ }
+
+ public void addSESEParent(FlatSESEEnterNode seseParent) {
+ this.seseParent.add(seseParent);
+ }
+
}
System.out.println(fsen);
System.out.println(fsen.getIsCallerSESEplaceholder());
System.out.println(fsen.getParent());
-
- if (fsen.getParent() != null) {
- conflictGraph = oooa.getConflictGraph(fsen.getParent());
+
+// if (fsen.getParent() != null) {
+ FlatSESEEnterNode parentSESE = null;
+ if (fsen.getSESEParent().size() > 0) {
+ parentSESE = (FlatSESEEnterNode) fsen.getSESEParent().iterator().next();
+ System.out.println("fsen getParent=" + parentSESE);
+ conflictGraph = oooa.getConflictGraph(parentSESE);
System.out.println("CG=" + conflictGraph);
if (conflictGraph != null)
System.out.println("Conflicts=" + conflictGraph.getConflictEffectSet(fsen));
+ // conflictGraph = oooa.getConflictGraph(fsen.getParent());
+ // System.out.println("CG=" + conflictGraph);
+ // if (conflictGraph != null)
+ // System.out.println("Conflicts=" +
+ // conflictGraph.getConflictEffectSet(fsen));
}
- if (!fsen.getIsCallerSESEplaceholder() && fsen.getParent() != null
- && (conflictGraph = oooa.getConflictGraph(fsen.getParent())) != null
- && (conflicts = conflictGraph.getConflictEffectSet(fsen)) != null) {
+// if (!fsen.getIsCallerSESEplaceholder() && fsen.getParent() != null
+// && (conflictGraph = oooa.getConflictGraph(fsen.getParent())) != null
+// && (conflicts = conflictGraph.getConflictEffectSet(fsen)) != null) {
+ if(!fsen.getIsCallerSESEplaceholder() && fsen.getSESEParent().size() > 0
+ && (conflictGraph = oooa.getConflictGraph(parentSESE)) != null
+ && (conflicts = conflictGraph.getConflictEffectSet(fsen)) != null ){
FlatMethod fm = fsen.getfmEnclosing();
ReachGraph rg = oooa.getDisjointAnalysis().getReachGraph(fm.getMethod());
if (cSideDebug)
FlatNode fn = codeit.next();
CodePlan cp = oooa.getCodePlan(fn);
FlatSESEEnterNode currentSESE = cp.getCurrentSESE();
- Analysis.OoOJava.ConflictGraph graph = oooa.getConflictGraph(currentSESE);
+
+ if(currentSESE.getSESEParent().size()==0){
+ continue;
+ }
+ FlatSESEEnterNode parent=(FlatSESEEnterNode)currentSESE.getSESEParent().iterator().next();
+// Analysis.OoOJava.ConflictGraph graph = oooa.getConflictGraph(currentSESE);
+ Analysis.OoOJava.ConflictGraph graph = oooa.getConflictGraph(parent);
if (graph != null) {
Set<Analysis.OoOJava.SESELock> seseLockSet = oooa.getLockMappings(graph);