From: Justin Viiret Date: Sun, 10 Jan 2016 22:25:32 +0000 (+1100) Subject: Move cyclic path redundancy into reduce loop X-Git-Tag: v4.2.0^2~164 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cca4116861716fa47b57a75527e62b0c32428642;p=thirdparty%2Fvectorscan.git Move cyclic path redundancy into reduce loop Sometimes cyclic path redundancy can uncover further reduction work that can be done by the other passes in the reduce loop. --- diff --git a/src/nfagraph/ng.cpp b/src/nfagraph/ng.cpp index 75884181..bc3aea38 100644 --- a/src/nfagraph/ng.cpp +++ b/src/nfagraph/ng.cpp @@ -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: @@ -167,6 +167,7 @@ void reduceGraph(NGHolder &g, som_type som, bool utf8, changed |= removeEdgeRedundancy(g, som, cc); changed |= reduceGraphEquivalences(g, cc); changed |= removeRedundancy(g, som); + changed |= removeCyclicPathRedundancy(g); if (!changed) { DEBUG_PRINTF("graph unchanged after pass %u, stopping\n", pass); break; @@ -183,7 +184,6 @@ void reduceGraph(NGHolder &g, som_type som, bool utf8, removeEdgeRedundancy(g, som, cc); } - removeCyclicPathRedundancy(g); removeCyclicDominated(g, som); if (!som) {