]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
Don't look for accel friends for multibyte acceleration
authorAnatoly Burakov <anatoly.burakov@intel.com>
Tue, 12 Jan 2016 16:21:20 +0000 (16:21 +0000)
committerMatthew Barr <matthew.barr@intel.com>
Tue, 1 Mar 2016 00:27:36 +0000 (11:27 +1100)
src/nfa/limex_compile.cpp

index d3e1a8ee0869db13d1d13c99c9aac067422ae608..dc372860f09c2d08bb4331afd7c3b54022aa857f 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:
@@ -662,15 +662,18 @@ void doAccelCommon(NGHolder &g,
         state_set.reset();
         state_set.set(state_id);
 
+        bool is_multi = false;
         auto p_it = accel->precalc.find(state_set);
         if (p_it != accel->precalc.end()) {
             const precalcAccel &pa = p_it->second;
             offset = max(pa.double_offset, pa.single_offset);
+            is_multi = pa.ma_info.type != MultibyteAccelInfo::MAT_NONE;
             assert(offset <= MAX_ACCEL_DEPTH);
         }
 
         accel->accelerable.insert(v);
-        findAccelFriends(g, v, br_cyclic, offset, &accel->friends[v]);
+        if (!is_multi)
+            findAccelFriends(g, v, br_cyclic, offset, &accel->friends[v]);
     }
 }