X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=cyclegraph.cc;h=66f9f69548608d02baa36dbd09bbd9b8ac2feac7;hb=dd1028f1a33deab855739112b3fc78663524455e;hp=9a511952b0826470befc1a2bcc7ecde85619265c;hpb=8cebf02d9a4c9f0fe80af04f6276f4978f3b93f5;p=model-checker.git diff --git a/cyclegraph.cc b/cyclegraph.cc index 9a51195..66f9f69 100644 --- a/cyclegraph.cc +++ b/cyclegraph.cc @@ -68,18 +68,12 @@ void CycleGraph::addEdge(const ModelAction *from, const ModelAction *to) if (fromnode->addEdge(tonode)) rollbackvector.push_back(fromnode); - - CycleNode *rmwnode = fromnode->getRMW(); - /* * If the fromnode has a rmwnode that is not the tonode, we should add * an edge between its rmwnode and the tonode - * - * If tonode is also a rmw, don't do this check as the execution is - * doomed and we'll catch the problem elsewhere, but we want to allow - * for the possibility of sending to's write value to rmwnode */ - if (rmwnode != NULL && !to->is_rmw()) { + CycleNode *rmwnode = fromnode->getRMW(); + if (rmwnode && rmwnode != tonode) { if (!hasCycles) hasCycles = checkReachable(tonode, rmwnode);