]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
rose_build_groups: move assignGroupsToRoles
authorJustin Viiret <justin.viiret@intel.com>
Thu, 2 Jun 2016 03:13:48 +0000 (13:13 +1000)
committerMatthew Barr <matthew.barr@intel.com>
Fri, 8 Jul 2016 00:47:07 +0000 (10:47 +1000)
src/rose/rose_build_compile.cpp
src/rose/rose_build_groups.cpp

index a6d18f67d99c0e1071f14492017f652f3d173289..05bde212a45b796681ec742eb143037302f36920 100644 (file)
@@ -1050,30 +1050,6 @@ void findGroupSquashers(RoseBuildImpl &tbi) {
     }
 }
 
-/**
- * The groups that a role sets are determined by the union of its successor
- * literals. Requires the literals already have had groups assigned.
- */
-void RoseBuildImpl::assignGroupsToRoles() {
-    /* Note: if there is a succ literal in the sidematcher, its successors
-     * literals must be added instead */
-    for (auto v : vertices_range(g)) {
-        if (isAnyStart(v)) {
-            continue;
-        }
-
-        const rose_group succ_groups = getSuccGroups(v);
-        g[v].groups |= succ_groups;
-
-        if (ghost.find(v) != ghost.end()) {
-            /* delayed roles need to supply their groups to the ghost role */
-            g[ghost[v]].groups |= succ_groups;
-        }
-
-        DEBUG_PRINTF("vertex %zu: groups=%llx\n", g[v].idx, g[v].groups);
-    }
-}
-
 void RoseBuildImpl::findTransientLeftfixes(void) {
     for (auto v : vertices_range(g)) {
         if (!g[v].left) {
index 127731be57e7b280f6a8fc19fd4ff30eb565ba4f..1a8d556e365362580cd5d7c633605b4df82ae5ee 100644 (file)
@@ -335,6 +335,30 @@ void RoseBuildImpl::assignGroupsToLiterals() {
     }
 }
 
+/**
+ * The groups that a role sets are determined by the union of its successor
+ * literals. Requires the literals already have had groups assigned.
+ */
+void RoseBuildImpl::assignGroupsToRoles() {
+    /* Note: if there is a succ literal in the sidematcher, its successors
+     * literals must be added instead */
+    for (auto v : vertices_range(g)) {
+        if (isAnyStart(v)) {
+            continue;
+        }
+
+        const rose_group succ_groups = getSuccGroups(v);
+        g[v].groups |= succ_groups;
+
+        if (ghost.find(v) != ghost.end()) {
+            /* delayed roles need to supply their groups to the ghost role */
+            g[ghost[v]].groups |= succ_groups;
+        }
+
+        DEBUG_PRINTF("vertex %zu: groups=%llx\n", g[v].idx, g[v].groups);
+    }
+}
+
 /**
  * \brief Returns a mapping from each graph vertex v to the intersection of the
  * groups switched on by all of the paths leading up to (and including) v from