cyclegraph: rename addEdge() to addNodeEdge()
authorBrian Norris <banorris@uci.edu>
Tue, 29 Jan 2013 02:30:28 +0000 (18:30 -0800)
committerBrian Norris <banorris@uci.edu>
Wed, 6 Feb 2013 21:44:38 +0000 (13:44 -0800)
This is a "low-level" internal function, where the other addEdge()
implementations will be high-level, external interfaces. Differentiate
the names, then.

cyclegraph.cc
cyclegraph.h

index 57f8fc8c42fe0033abbe83d14caa674feeedb1e7..89c3f2ca39675ed048639e8e57428037ad88cc7f 100644 (file)
@@ -60,7 +60,7 @@ void CycleGraph::addEdge(const ModelAction *from, const ModelAction *to)
        CycleNode *fromnode = getNode(from);
        CycleNode *tonode = getNode(to);
 
        CycleNode *fromnode = getNode(from);
        CycleNode *tonode = getNode(to);
 
-       addEdge(fromnode, tonode);
+       addNodeEdge(fromnode, tonode);
 }
 
 /**
 }
 
 /**
@@ -68,7 +68,7 @@ void CycleGraph::addEdge(const ModelAction *from, const ModelAction *to)
  * @param fromnode The edge comes from this CycleNode
  * @param tonode The edge points to this CycleNode
  */
  * @param fromnode The edge comes from this CycleNode
  * @param tonode The edge points to this CycleNode
  */
-void CycleGraph::addEdge(CycleNode *fromnode, CycleNode *tonode)
+void CycleGraph::addNodeEdge(CycleNode *fromnode, CycleNode *tonode)
 {
        if (!hasCycles)
                hasCycles = checkReachable(tonode, fromnode);
 {
        if (!hasCycles)
                hasCycles = checkReachable(tonode, fromnode);
@@ -131,7 +131,7 @@ void CycleGraph::addRMWEdge(const ModelAction *from, const ModelAction *rmw)
                }
        }
 
                }
        }
 
-       addEdge(fromnode, rmwnode);
+       addNodeEdge(fromnode, rmwnode);
 }
 
 #if SUPPORT_MOD_ORDER_DUMP
 }
 
 #if SUPPORT_MOD_ORDER_DUMP
index a909c10b50a49f97453bf1f6114223400b11c4ac..5c49992ea26b7dc99bc88cea4040e98c88cc3361 100644 (file)
@@ -39,7 +39,7 @@ class CycleGraph {
 
        SNAPSHOTALLOC
  private:
 
        SNAPSHOTALLOC
  private:
-       void addEdge(CycleNode *fromnode, CycleNode *tonode);
+       void addNodeEdge(CycleNode *fromnode, CycleNode *tonode);
        void putNode(const ModelAction *act, CycleNode *node);
        CycleNode * getNode(const ModelAction *);
        HashTable<const CycleNode *, const CycleNode *, uintptr_t, 4, model_malloc, model_calloc, model_free> *discovered;
        void putNode(const ModelAction *act, CycleNode *node);
        CycleNode * getNode(const ModelAction *);
        HashTable<const CycleNode *, const CycleNode *, uintptr_t, 4, model_malloc, model_calloc, model_free> *discovered;