]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
use the correct way to refer to void *
authorAlex Coyte <a.coyte@intel.com>
Fri, 6 May 2016 03:20:00 +0000 (13:20 +1000)
committerMatthew Barr <matthew.barr@intel.com>
Fri, 8 Jul 2016 00:45:06 +0000 (10:45 +1000)
src/nfagraph/ng_calc_components.cpp
src/nfagraph/ng_rose.cpp
src/rose/rose_build_add.cpp
src/rose/rose_build_matchers.cpp
src/rose/rose_build_merge.cpp
src/rose/rose_build_role_aliasing.cpp

index 5ca5ce3a7807ff271608f4866a0a89a241e860b8..9365cfb376e65af0631061b0394c73d7c07c2d3b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Intel Corporation
+ * Copyright (c) 2015-2016, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -219,8 +219,8 @@ vector<NFAEdge> findShellEdges(const NGHolder &g,
 
 static
 void removeVertices(const flat_set<NFAVertex> &verts, NFAUndirectedGraph &ug,
-                    ue2::unordered_map<NFAVertex, NFAUndirectedVertex> &old2new,
-                    ue2::unordered_map<NFAVertex, NFAUndirectedVertex> &new2old) {
+                   ue2::unordered_map<NFAVertex, NFAUndirectedVertex> &old2new,
+                   ue2::unordered_map<NFAUndirectedVertex, NFAVertex> &new2old) {
     for (auto v : verts) {
         assert(contains(old2new, v));
         auto uv = old2new.at(v);
@@ -280,7 +280,7 @@ void splitIntoComponents(const NGHolder &g, deque<unique_ptr<NGHolder>> &comps,
     createUnGraph(g.g, true, true, ug, old2new, newIdx2old);
 
     // Construct reverse mapping.
-    ue2::unordered_map<NFAVertex, NFAUndirectedVertex> new2old;
+    ue2::unordered_map<NFAUndirectedVertex, NFAVertex> new2old;
     for (const auto &m : old2new) {
         new2old.emplace(m.second, m.first);
     }
@@ -308,7 +308,7 @@ void splitIntoComponents(const NGHolder &g, deque<unique_ptr<NGHolder>> &comps,
 
     // Collect vertex lists per component.
     for (const auto &m : split_components) {
-        NFAVertex uv = m.first;
+        NFAUndirectedVertex uv = m.first;
         u32 c = m.second;
         assert(contains(new2old, uv));
         NFAVertex v = new2old.at(uv);
index 3015af4c527a915878670e8e8e86ffc9ccb7f799..997191d218b981c0c6f38df78b7097fb25d50718 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Intel Corporation
+ * Copyright (c) 2015-2016, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -2245,7 +2245,7 @@ bool improveLHS(RoseInGraph &ig, const vector<RoseInEdge> &edges,
         const vector<RoseInEdge> &local = by_src[v];
 
         vector<NGHolder *> graphs;
-        map<RoseInVertex, vector<RoseInEdge> > by_graph;
+        map<NGHolder *, vector<RoseInEdge> > by_graph;
         for (const auto &e : local) {
             NGHolder *gp = ig[e].graph.get();
             if (!contains(by_graph, gp)) {
index 23c122a75dfb6db6ee18537535da3d4b81da1506..ae1553614c4d4e30b881f59b6fcb93028c9474dd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Intel Corporation
+ * Copyright (c) 2015-2016, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -315,7 +315,7 @@ void createVertices(RoseBuildImpl *tbi,
             w = created[key];
         }
 
-        NFAVertex p = pv.first;
+        RoseVertex p = pv.first;
 
         RoseEdge e;
         bool added;
@@ -943,7 +943,7 @@ void populateRoseGraph(RoseBuildImpl *tbi, RoseBuildData &bd) {
             const vector<RoseVertex> &images = vertex_map[u];
 
             // We should have no dupes.
-            assert(set<NFAVertex>(images.begin(), images.end()).size()
+            assert(set<RoseVertex>(images.begin(), images.end()).size()
                    == images.size());
 
             for (auto v_image : images) {
@@ -1133,7 +1133,7 @@ u32 maxAvailableDelay(const ue2_literal &pred_key, const ue2_literal &lit_key) {
 }
 
 static
-u32 findMaxSafeDelay(const RoseInGraph &ig, RoseInVertex u, RoseVertex v) {
+u32 findMaxSafeDelay(const RoseInGraph &ig, RoseInVertex u, RoseInVertex v) {
     // First, check the overlap constraints on (u,v).
     size_t max_delay;
     if (ig[v].type == RIV_LITERAL) {
index 83c4955607e8355457796021d6ab308f49814db9..12aadd72a5b5d444f2786c2acf6bddac2d794c52 100644 (file)
@@ -359,7 +359,7 @@ bool isDirectHighlander(const RoseBuildImpl &build, const u32 id,
 
 // Called by isNoRunsLiteral below.
 static
-bool isNoRunsVertex(const RoseBuildImpl &build, NFAVertex u) {
+bool isNoRunsVertex(const RoseBuildImpl &build, RoseVertex u) {
     const RoseGraph &g = build.g;
     if (!g[u].isBoring()) {
         DEBUG_PRINTF("u=%zu is not boring\n", g[u].idx);
index a10bc86e9001e7aaa268581e4dd58f275430d408..759e0dbeafaeb7ab1623a27592d4cc68cf6c90fb 100644 (file)
@@ -338,7 +338,7 @@ void findUncalcLeavesCandidates(RoseBuildImpl &tbi,
                            deque<UncalcLeafKey> &ordered) {
     const RoseGraph &g = tbi.g;
 
-    vector<NFAVertex> suffix_vertices; // vertices with suffix graphs
+    vector<RoseVertex> suffix_vertices; // vertices with suffix graphs
     ue2::unordered_map<const NGHolder *, u32> fcount; // ref count per graph
 
     for (auto v : vertices_range(g)) {
index 1f873403135b95fcf768c7b3a8275f1838bbecf4..8e883ab914dc6ac5f7b4ddba768b6a33c1144b29 100644 (file)
@@ -1185,8 +1185,7 @@ bool attemptRoseGraphMerge(RoseBuildImpl &tbi, bool preds_same, RoseVertex a,
         ReportID new_report = tbi.getNewNfaReport();
         shared_ptr<NGHolder> new_graph = cloneHolder(*b_h);
         duplicateReport(*new_graph, b_left.leftfix_report, new_report);
-        pruneReportIfUnused(tbi, new_graph, set<NFAVertex>(),
-                            b_left.leftfix_report);
+        pruneReportIfUnused(tbi, new_graph, {}, b_left.leftfix_report);
 
         rrm[a_left_id].erase(a);
         rrm[b_left_id].erase(b);