]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
violet: don't bother swapping holders if unable to trim graph
authorAlex Coyte <a.coyte@intel.com>
Tue, 8 Aug 2017 01:24:52 +0000 (11:24 +1000)
committerMatthew Barr <matthew.barr@intel.com>
Mon, 21 Aug 2017 01:25:21 +0000 (11:25 +1000)
src/nfagraph/ng_violet.cpp

index 0a3a97a0de25dd425d117b95b1a5620b4b10c819..7a4de5f5efaeebb7ad8778e6aae042bc1011afd7 100644 (file)
@@ -1713,6 +1713,11 @@ void removeRedundantLiteralsFromInfix(const NGHolder &h, RoseInGraph &ig,
             continue;
         }
 
+        if (!delay) {
+            /* unable to trim graph --> no point swapping to new holder */
+            continue;
+        }
+
         assert(isCorrectlyTopped(*h_new));
         graphs[right] = make_pair(h_new, delay);
     }